bits

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: 0BSD Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const UintSize = 64

Variables

This section is empty.

Functions

func Add

func Add(x uint, y uint, carry uint) (sum uint, carryOut uint)

func Add32

func Add32(x uint32, y uint32, carry uint32) (sum uint32, carryOut uint32)

func Add64

func Add64(x uint64, y uint64, carry uint64) (sum uint64, carryOut uint64)

func Div

func Div(hi uint, lo uint, y uint) (quo uint, rem uint)

func Div32

func Div32(hi uint32, lo uint32, y uint32) (quo uint32, rem uint32)

func Div64

func Div64(hi uint64, lo uint64, y uint64) (quo uint64, rem uint64)

func LeadingZeros

func LeadingZeros(x uint) int

func LeadingZeros8

func LeadingZeros8(x uint8) int

func LeadingZeros16

func LeadingZeros16(x uint16) int

func LeadingZeros32

func LeadingZeros32(x uint32) int

func LeadingZeros64

func LeadingZeros64(x uint64) int

func Len

func Len(x uint) int

func Len8

func Len8(x uint8) int

func Len16

func Len16(x uint16) (n int)

func Len32

func Len32(x uint32) (n int)

func Len64

func Len64(x uint64) (n int)

func Mul

func Mul(x uint, y uint) (hi uint, lo uint)

func Mul32

func Mul32(x uint32, y uint32) (hi uint32, lo uint32)

func Mul64

func Mul64(x uint64, y uint64) (hi uint64, lo uint64)

func OnesCount

func OnesCount(x uint) int

func OnesCount8

func OnesCount8(x uint8) int

func OnesCount16

func OnesCount16(x uint16) int

func OnesCount32

func OnesCount32(x uint32) int

func OnesCount64

func OnesCount64(x uint64) int

func Rem

func Rem(hi uint, lo uint, y uint) uint

func Rem32

func Rem32(hi uint32, lo uint32, y uint32) uint32

func Rem64

func Rem64(hi uint64, lo uint64, y uint64) uint64

func Reverse

func Reverse(x uint) uint

func Reverse8

func Reverse8(x uint8) uint8

func Reverse16

func Reverse16(x uint16) uint16

func Reverse32

func Reverse32(x uint32) uint32

func Reverse64

func Reverse64(x uint64) uint64

func ReverseBytes

func ReverseBytes(x uint) uint

func ReverseBytes16

func ReverseBytes16(x uint16) uint16

func ReverseBytes32

func ReverseBytes32(x uint32) uint32

func ReverseBytes64

func ReverseBytes64(x uint64) uint64

func RotateLeft

func RotateLeft(x uint, k int) uint

func RotateLeft8

func RotateLeft8(x uint8, k int) uint8

func RotateLeft16

func RotateLeft16(x uint16, k int) uint16

func RotateLeft32

func RotateLeft32(x uint32, k int) uint32

func RotateLeft64

func RotateLeft64(x uint64, k int) uint64

func Sub

func Sub(x uint, y uint, borrow uint) (diff uint, borrowOut uint)

func Sub32

func Sub32(x uint32, y uint32, borrow uint32) (diff uint32, borrowOut uint32)

func Sub64

func Sub64(x uint64, y uint64, borrow uint64) (diff uint64, borrowOut uint64)

func TrailingZeros

func TrailingZeros(x uint) int

func TrailingZeros8

func TrailingZeros8(x uint8) int

func TrailingZeros16

func TrailingZeros16(x uint16) int

func TrailingZeros32

func TrailingZeros32(x uint32) int

func TrailingZeros64

func TrailingZeros64(x uint64) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL