MCPcopy
hub / github.com/shopspring/decimal / NewFromBigInt

Function NewFromBigInt

decimal.go:146–151  ·  view source on GitHub ↗

NewFromBigInt returns a new Decimal from a big.Int, value * 10 ^ exp

(value *big.Int, exp int32)

Source from the content-addressed store, hash-verified

144
145// NewFromBigInt returns a new Decimal from a big.Int, value * 10 ^ exp
146func NewFromBigInt(value *big.Int, exp int32) Decimal {
147 return Decimal{
148 value: new(big.Int).Set(value),
149 exp: exp,
150 }
151}
152
153// NewFromBigRat returns a new Decimal from a big.Rat. The numerator and
154// denominator are divided and rounded to the given precision.

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…