Float64 returns the nearest float64 value for d and a bool indicating whether f represents d exactly. For more details, see the documentation for big.Rat.Float64
()
| 1447 | // whether f represents d exactly. |
| 1448 | // For more details, see the documentation for big.Rat.Float64 |
| 1449 | func (d Decimal) Float64() (f float64, exact bool) { |
| 1450 | return d.Rat().Float64() |
| 1451 | } |
| 1452 | |
| 1453 | // InexactFloat64 returns the nearest float64 value for d. |
| 1454 | // It doesn't indicate if the returned value represents d exactly. |