Standard library / math/big

big.ToPositiveInf

Rounds toward positive infinity. Expected stdout: '-4\n'.

Formal Syntax & Structure

go syntaxgo
const ToPositiveInf RoundingMode = 5

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/big")
func main() {  fmt.Println(new(big.Float).SetPrec(2).SetMode(big.ToPositiveInf).SetInt64(-5))}
Go Reference