Standard library / math/big
big.ToNegativeInf
Rounds toward negative infinity. Expected stdout: '-6\n'.
Formal Syntax & Structure
go syntaxgo
const ToNegativeInf RoundingMode = 4Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { fmt.Println(new(big.Float).SetPrec(2).SetMode(big.ToNegativeInf).SetInt64(-5))}