Documentation ¶
Index ¶
- func Binary(s string) (*big.Int, bool)
- func BitsSet(x *big.Int) []int
- func BytesLittleEndian(x *big.Int) []byte
- func Clone(x *big.Int) *big.Int
- func Equal(x, y *big.Int) bool
- func EqualInt64(x *big.Int, y int64) bool
- func Extract(x *big.Int, l, h uint) *big.Int
- func FromUint64s(words []uint64) *big.Int
- func Hex(s string) (*big.Int, bool)
- func IsNonZero(x *big.Int) bool
- func IsPow2(x *big.Int) bool
- func IsZero(x *big.Int) bool
- func Mask(l, h uint) *big.Int
- func Max(x, y *big.Int) *big.Int
- func Min(x, y *big.Int) *big.Int
- func MinMax(x, y *big.Int) (min, max *big.Int)
- func MustBinary(s string) *big.Int
- func MustHex(s string) *big.Int
- func One() *big.Int
- func Ones(n uint) *big.Int
- func Pow2(e uint) *big.Int
- func Pow2UpTo(x *big.Int) []*big.Int
- func RandBits(r *rand.Rand, n uint) *big.Int
- func TrailingZeros(x *big.Int) int
- func Uint64s(x *big.Int) []uint64
- func Zero() *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Binary ¶
Binary parses a binary string into an integer, returning the integer and a boolean indicating success. Underscore may be used as a separator.
func BytesLittleEndian ¶
BytesLittleEndian returns the absolute value of x as a little-endian byte slice.
func EqualInt64 ¶
EqualInt64 is a convenience for checking if x equals the int64 value y.
func FromUint64s ¶
FromUint64s builds a big integer from little-endian 64-bit limbs.
func Hex ¶
Hex constructs an integer from a hex string, returning the integer and a boolean indicating success. Underscore may be used as a separator.
func MustBinary ¶
MustBinary constructs an integer from a binary string. It panics on error.
func TrailingZeros ¶
TrailingZeros returns the number of trailing zero bits in x. Returns 0 if x is 0.
Types ¶
This section is empty.