Standard library / math/big

big.Float.Quo()

Divides operands with receiver precision and rounding mode; 0/0 and Inf/Inf panic with ErrNaN. Expected stdout: '0.125\n'.

Formal Syntax & Structure

go syntaxgo
func (z *Float) Quo(x, y *Float) *Float

Parameters & Attributes

NameTypeDescription
x*FloatFirst input operand (or sole input if unary).
y*FloatSecond input operand.

Return Value

*Float

Divides operands with receiver precision and rounding mode; 0/0 and Inf/Inf panic with ErrNaN.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/big")
func main() {  fmt.Println(new(big.Float).SetPrec(80).Quo(big.NewFloat(1), big.NewFloat(8)))}
Go Reference