Standard library / math/big
big.Float.Float64()
Convert to the nearest float64 with an accuracy indicator; the receiver can have more than 53 bits of precision. Expected stdout: '9007199254740992 Below\n'.
Formal Syntax & Structure
go syntaxgo
func (x *Float) Float64() (float64, Accuracy)Return Value
(float64, Accuracy)
Returns the result described above; see the example for the observed behavior.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { x := new(big.Float).SetInt(big.NewInt(9007199254740993)) v, a := x.Float64() fmt.Printf("%.0f %s\n", v, a)}