Standard library / math/big
big.Float
Variable-precision binary float with explicit precision and rounding mode. It is not exact decimal arithmetic. Expected stdout: '42 80\n'.
Formal Syntax & Structure
go syntaxgo
type Float struct { /* unexported fields */ }Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { v := new(big.Float).SetPrec(80).SetInt64(42) fmt.Println(v, v.Prec())}