Standard library / math/bits
bits.Rem32()
Computes double-width dividend remainder; panics on zero divisor but not quotient overflow. Expected stdout: '2\n'.
Formal Syntax & Structure
go syntaxgo
func Rem32(hi, lo, y uint32) uint32Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| hi | uint32 | High word of the double-width input. |
| lo | uint32 | Low word of the double-width input. |
| y | uint32 | Second input operand. |
Return Value
uint32
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.Rem32(0, 17, 5))}