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

Method BigInt

decimal.go:1419–1422  ·  view source on GitHub ↗

BigInt returns integer component of the decimal as a BigInt.

()

Source from the content-addressed store, hash-verified

1417
1418// BigInt returns integer component of the decimal as a BigInt.
1419func (d Decimal) BigInt() *big.Int {
1420 scaledD := d.rescale(0)
1421 return scaledD.value
1422}
1423
1424// BigFloat returns decimal as BigFloat.
1425// Be aware that casting decimal to BigFloat might cause a loss of precision.

Callers 1

TestBigIntFunction · 0.80

Calls 1

rescaleMethod · 0.95

Tested by 1

TestBigIntFunction · 0.64