Float64 returns the number as a float64.
(bitSize int)
| 131 | |
| 132 | // Float64 returns the number as a float64. |
| 133 | func (n Number) floatOfBitSize(bitSize int) (float64, error) { |
| 134 | return strconv.ParseFloat(string(n), bitSize) |
| 135 | } |
| 136 | |
| 137 | // BigFloat attempts to convert the number to a big.Float, returns an error if the operation fails. |
| 138 | func (n Number) BigFloat() (*big.Float, error) { |