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) *FloatParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | *Float | First input operand (or sole input if unary). |
| y | *Float | Second 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)))}