Standard library / math/big
big.Float.Prec()
Read the configured mantissa precision in bits, not decimal digits. Expected stdout: '80\n'.
Formal Syntax & Structure
go syntaxgo
func (x *Float) Prec() uintReturn Value
uint
Returns the result described above; see the example for the observed behavior.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { fmt.Println(big.NewFloat(1.25).SetPrec(80).Prec())}