Standard library / math/bits
bits.Rem64()
Computes double-width dividend remainder; panics on zero divisor but not quotient overflow. Expected stdout: '2\n'.
Formal Syntax & Structure
go syntaxgo
func Rem64(hi, lo, y uint64) uint64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| hi | uint64 | High word of the double-width input. |
| lo | uint64 | Low word of the double-width input. |
| y | uint64 | Second input operand. |
Return Value
uint64
Computes double-width dividend remainder; panics on zero divisor but not quotient overflow.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/bits")
func main() { fmt.Println(bits.Rem64(0, 17, 5))}