Standard library / math/big
big.Int.Quo()
Stores truncated integer quotient toward zero; zero divisor panics. Expected stdout: '-2\n'.
Formal Syntax & Structure
go syntaxgo
func (z *Int) Quo(x, y *Int) *IntParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | *Int | First input operand (or sole input if unary). |
| y | *Int | Second input operand. |
Return Value
*Int
Stores truncated integer quotient toward zero; zero divisor panics.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { fmt.Println(new(big.Int).Quo(big.NewInt(-7), big.NewInt(3)))}