MCPcopy Create free account
hub / github.com/cockroachdb/apd / New

Function New

decimal.go:80–84  ·  view source on GitHub ↗

New creates a new decimal with the given coefficient and exponent.

(coeff int64, exponent int32)

Source from the content-addressed store, hash-verified

78
79// New creates a new decimal with the given coefficient and exponent.
80func New(coeff int64, exponent int32) *Decimal {
81 d := new(Decimal)
82 d.SetFinite(coeff, exponent)
83 return d
84}
85
86// NewWithBigInt creates a new decimal with the given coefficient and exponent.
87func NewWithBigInt(coeff *BigInt, exponent int32) *Decimal {

Calls 1

SetFiniteMethod · 0.80