package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Functions

Add returns the sum with carry of x, y and carry: sum = x + y + carry.
Add32 returns the sum with carry of x, y and carry: sum = x + y + carry.
Add64 returns the sum with carry of x, y and carry: sum = x + y + carry.
Div returns the quotient and remainder of (hi, lo) divided by y: quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper half in parameter hi and the lower half in parameter lo.
Div32 returns the quotient and remainder of (hi, lo) divided by y: quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper half in parameter hi and the lower half in parameter lo.
Div64 returns the quotient and remainder of (hi, lo) divided by y: quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper half in parameter hi and the lower half in parameter lo.
LeadingZeros returns the number of leading zero bits in x; the result is [UintSize] for x == 0.
LeadingZeros16 returns the number of leading zero bits in x; the result is 16 for x == 0.
LeadingZeros32 returns the number of leading zero bits in x; the result is 32 for x == 0.
LeadingZeros64 returns the number of leading zero bits in x; the result is 64 for x == 0.
LeadingZeros8 returns the number of leading zero bits in x; the result is 8 for x == 0.
Len returns the minimum number of bits required to represent x; the result is 0 for x == 0.
Len16 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
Len32 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
Len64 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
Len8 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
Mul returns the full-width product of x and y: (hi, lo) = x * y with the product bits' upper half returned in hi and the lower half returned in lo.
Mul32 returns the 64-bit product of x and y: (hi, lo) = x * y with the product bits' upper half returned in hi and the lower half returned in lo.
Mul64 returns the 128-bit product of x and y: (hi, lo) = x * y with the product bits' upper half returned in hi and the lower half returned in lo.
OnesCount returns the number of one bits ("population count") in x.
OnesCount16 returns the number of one bits ("population count") in x.
OnesCount32 returns the number of one bits ("population count") in x.
OnesCount64 returns the number of one bits ("population count") in x.
OnesCount8 returns the number of one bits ("population count") in x.
Rem returns the remainder of (hi, lo) divided by y.
Rem32 returns the remainder of (hi, lo) divided by y.
Rem64 returns the remainder of (hi, lo) divided by y.
Reverse returns the value of x with its bits in reversed order.
Reverse16 returns the value of x with its bits in reversed order.
Reverse32 returns the value of x with its bits in reversed order.
Reverse64 returns the value of x with its bits in reversed order.
Reverse8 returns the value of x with its bits in reversed order.
ReverseBytes returns the value of x with its bytes in reversed order.
ReverseBytes16 returns the value of x with its bytes in reversed order.
ReverseBytes32 returns the value of x with its bytes in reversed order.
ReverseBytes64 returns the value of x with its bytes in reversed order.
RotateLeft returns the value of x rotated left by (k mod [UintSize]) bits.
RotateLeft16 returns the value of x rotated left by (k mod 16) bits.
RotateLeft32 returns the value of x rotated left by (k mod 32) bits.
RotateLeft64 returns the value of x rotated left by (k mod 64) bits.
RotateLeft8 returns the value of x rotated left by (k mod 8) bits.
Sub returns the difference of x, y and borrow: diff = x - y - borrow.
Sub32 returns the difference of x, y and borrow, diff = x - y - borrow.
Sub64 returns the difference of x, y and borrow: diff = x - y - borrow.
TrailingZeros returns the number of trailing zero bits in x; the result is [UintSize] for x == 0.
TrailingZeros16 returns the number of trailing zero bits in x; the result is 16 for x == 0.
TrailingZeros32 returns the number of trailing zero bits in x; the result is 32 for x == 0.
TrailingZeros64 returns the number of trailing zero bits in x; the result is 64 for x == 0.
TrailingZeros8 returns the number of trailing zero bits in x; the result is 8 for x == 0.

# Constants

UintSize is the size of a uint in bits.