Standard library / math/big
big.Float.MinPrec()
Find the smallest binary mantissa precision that preserves the current value; zero and infinity return zero. Expected stdout: '3\n'.
Formal Syntax & Structure
go syntaxgo
func (x *Float) MinPrec() 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).MinPrec())}