BigFloat returns decimal as BigFloat. Be aware that casting decimal to BigFloat might cause a loss of precision.
()
| 1424 | // BigFloat returns decimal as BigFloat. |
| 1425 | // Be aware that casting decimal to BigFloat might cause a loss of precision. |
| 1426 | func (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. |
| 1433 | func (d Decimal) Rat() *big.Rat { |