go: cuelang.org/go/pkg/math/bits Index | Files

package bits

import "cuelang.org/go/pkg/math/bits"

Index

Package Files

manual.go

func And Uses

func And(a, b *big.Int) *big.Int

And returns the bitwise and of a and b (a & b in Go).

func Clear Uses

func Clear(a, b *big.Int) *big.Int

Clear returns the bitwise and not of a and b (a &^ b in Go).

func Len Uses

func Len(x uint64) int

Len returns the minimum number of bits required to represent x; the result is 0 for x == 0.

func OnesCount Uses

func OnesCount(x uint64) int

OnesCount returns the number of one bits ("population count") in x.

func Or Uses

func Or(a, b *big.Int) *big.Int

Or returns the bitwise or of a and b (a | b in Go).

func Reverse Uses

func Reverse(x uint64) uint64

Reverse returns the value of x with its bits in reversed order.

func ReverseBytes Uses

func ReverseBytes(x uint64) uint64

ReverseBytes returns the value of x with its bytes in reversed order.

func RotateLeft Uses

func RotateLeft(x uint64, k int) uint64

RotateLeft returns the value of x rotated left by (k mod UintSize) bits. To rotate x right by k bits, call RotateLeft(x, -k).

func Xor Uses

func Xor(a, b *big.Int) *big.Int

Xor returns the bitwise xor of a and b (a ^ b in Go).

Package bits imports 2 packages (graph). Updated 2019-08-18. Refresh now. Tools for package owners.