Standard library / math/big

big.Float.Mode()

Read the receiver's current rounding mode. Expected stdout: 'ToPositiveInf\n'.

Formal Syntax & Structure

go syntaxgo
func (x *Float) Mode() RoundingMode

Return Value

RoundingMode

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(new(big.Float).SetMode(big.ToPositiveInf).Mode())}
Go Reference