Standard library / math/big

big.Float.MantExp()

Separate a nonzero finite value into a normalized mantissa and binary exponent. Nil mantissa requests the exponent only. Expected stdout: '0.75 4\n'.

Formal Syntax & Structure

go syntaxgo
func (x *Float) MantExp(mant *Float) (exp int)

Parameters & Attributes

NameTypeDescription
mant*FloatMantissa input or output.

Return Value

(exp int)

Returns the result described above; see the example for the observed behavior.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/big")
func main() {  m := new(big.Float)  e := big.NewFloat(12).MantExp(m)  fmt.Println(m, e)}
Go Reference