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

Method BigFloat

decimal.go:1426–1430  ·  view source on GitHub ↗

BigFloat returns decimal as BigFloat. Be aware that casting decimal to BigFloat might cause a loss of precision.

()

Source from the content-addressed store, hash-verified

1424// BigFloat returns decimal as BigFloat.
1425// Be aware that casting decimal to BigFloat might cause a loss of precision.
1426func (d Decimal) BigFloat() *big.Float {
1427 f := &big.Float{}
1428 f.SetString(d.String())
1429 return f
1430}
1431
1432// Rat returns a rational number representation of the decimal.
1433func (d Decimal) Rat() *big.Rat {

Callers 1

TestBigFloatFunction · 0.80

Calls 1

StringMethod · 0.95

Tested by 1

TestBigFloatFunction · 0.64