Versions in this module Expand all Collapse all v0 v0.3.2 Jul 18, 2026 v0.3.1 Jul 18, 2026 Changes in this version + const IntBits + const MaxInt + const MaxUint + const MinInt + const UintPtrBits + var MaxInt128 *big.Int + var MaxUint128 *big.Int + var MinInt128 *big.Int + func AddOverflowInt16(a, b int16) (r int16, ovf bool) + func AddOverflowInt32(a, b int32) (r int32, ovf bool) + func AddOverflowInt64(a, b int64) (r int64, ovf bool) + func AddOverflowInt8(a, b int8) (r int8, ovf bool) + func AddUint128_64(a, b uint64) (hi uint64, lo uint64) + func BinaryLog(n *big.Int, mantissaBits int) (characteristic int, mantissa *big.Int) + func BitLen(n int) int + func BitLenByte(n byte) int + func BitLenUint(n uint) int + func BitLenUint16(n uint16) int + func BitLenUint32(n uint32) int + func BitLenUint64(n uint64) int + func BitLenUintptr(n uintptr) int + func CheckAddInt64(a, b int64) (sum int64, gt bool) + func CheckSubInt64(a, b int64) (sum int64, lt bool) + func Clamp(v, lo, hi int) int + func ClampByte(v, lo, hi byte) byte + func ClampInt16(v, lo, hi int16) int16 + func ClampInt32(v, lo, hi int32) int32 + func ClampInt64(v, lo, hi int64) int64 + func ClampInt8(v, lo, hi int8) int8 + func ClampUint16(v, lo, hi uint16) uint16 + func ClampUint32(v, lo, hi uint32) uint32 + func ClampUint64(v, lo, hi uint64) uint64 + func Envelope(x float64, points []float64, approximation Approximation) float64 + func GCDByte(a, b byte) byte + func GCDUint16(a, b uint16) uint16 + func GCDUint32(a, b uint32) uint32 + func GCDUint64(a, b uint64) uint64 + func ISqrt(n uint32) (x uint32) + func IsPrime(n uint32) bool + func IsPrimeUint16(n uint16) bool + func IsPrimeUint64(n uint64) bool + func Log2Byte(n byte) int + func Log2Uint16(n uint16) int + func Log2Uint32(n uint32) int + func Log2Uint64(n uint64) int + func Max(a, b int) int + func MaxByte(a, b byte) byte + func MaxBytePtr(a, b *byte) *byte + func MaxByteVal(val byte, vals ...byte) byte + func MaxInt16(a, b int16) int16 + func MaxInt16Ptr(a, b *int16) *int16 + func MaxInt16Val(val int16, vals ...int16) int16 + func MaxInt32(a, b int32) int32 + func MaxInt32Ptr(a, b *int32) *int32 + func MaxInt32Val(val int32, vals ...int32) int32 + func MaxInt64(a, b int64) int64 + func MaxInt64Ptr(a, b *int64) *int64 + func MaxInt64Val(val int64, vals ...int64) int64 + func MaxInt8(a, b int8) int8 + func MaxInt8Ptr(a, b *int8) *int8 + func MaxInt8Val(val int8, vals ...int8) int8 + func MaxPtr(a, b *int) *int + func MaxUint16(a, b uint16) uint16 + func MaxUint16Ptr(a, b *uint16) *uint16 + func MaxUint16Val(val uint16, vals ...uint16) uint16 + func MaxUint32(a, b uint32) uint32 + func MaxUint32Ptr(a, b *uint32) *uint32 + func MaxUint32Val(val uint32, vals ...uint32) uint32 + func MaxUint64(a, b uint64) uint64 + func MaxUint64Ptr(a, b *uint64) *uint64 + func MaxUint64Val(val uint64, vals ...uint64) uint64 + func MaxVal(val int, vals ...int) int + func Min(a, b int) int + func MinByte(a, b byte) byte + func MinBytePtr(a, b *byte) *byte + func MinByteVal(val byte, vals ...byte) byte + func MinInt16(a, b int16) int16 + func MinInt16Ptr(a, b *int16) *int16 + func MinInt16Val(val int16, vals ...int16) int16 + func MinInt32(a, b int32) int32 + func MinInt32Ptr(a, b *int32) *int32 + func MinInt32Val(val int32, vals ...int32) int32 + func MinInt64(a, b int64) int64 + func MinInt64Ptr(a, b *int64) *int64 + func MinInt64Val(val int64, vals ...int64) int64 + func MinInt8(a, b int8) int8 + func MinInt8Ptr(a, b *int8) *int8 + func MinInt8Val(val int8, vals ...int8) int8 + func MinPtr(a, b *int) *int + func MinUint16(a, b uint16) uint16 + func MinUint16Ptr(a, b *uint16) *uint16 + func MinUint16Val(val uint16, vals ...uint16) uint16 + func MinUint32(a, b uint32) uint32 + func MinUint32Ptr(a, b *uint32) *uint32 + func MinUint32Val(val uint32, vals ...uint32) uint32 + func MinUint64(a, b uint64) uint64 + func MinUint64Ptr(a, b *uint64) *uint64 + func MinUint64Val(val uint64, vals ...uint64) uint64 + func MinVal(val int, vals ...int) int + func ModPowBigInt(b, e, m *big.Int) (r *big.Int) + func ModPowByte(b, e, m byte) byte + func ModPowUint16(b, e, m uint16) uint16 + func ModPowUint32(b, e, m uint32) uint32 + func ModPowUint64(b, e, m uint64) (r uint64) + func MulOverflowInt16(a, b int16) (r int16, ovf bool) + func MulOverflowInt32(a, b int32) (r int32, ovf bool) + func MulOverflowInt64(a, b int64) (r int64, ovf bool) + func MulOverflowInt8(a, b int8) (r int8, ovf bool) + func MulUint128_64(a, b uint64) (hi, lo uint64) + func NextPrime(n uint32) (p uint32, ok bool) + func NextPrimeUint16(n uint16) (p uint16, ok bool) + func NextPrimeUint64(n uint64) (p uint64, ok bool) + func PermutationFirst(data sort.Interface) + func PermutationNext(data sort.Interface) bool + func PopCount(n int) int + func PopCountBigInt(n *big.Int) (r int) + func PopCountByte(n byte) int + func PopCountUint(n uint) int + func PopCountUint16(n uint16) int + func PopCountUint32(n uint32) int + func PopCountUint64(n uint64) int + func PopCountUintptr(n uintptr) int + func PowerizeBigInt(b, n *big.Int) (e uint32, p *big.Int) + func PowerizeUint32BigInt(b uint32, n *big.Int) (e uint32, p *big.Int) + func PrimorialProductsUint32(lo, hi, max uint32) (r []uint32) + func ProbablyPrimeBigInt(n, a *big.Int) bool + func ProbablyPrimeBigInt_32(n *big.Int, a uint32) bool + func ProbablyPrimeUint32(n, a uint32) bool + func ProbablyPrimeUint64_32(n uint64, a uint32) bool + func QCmpUint32(a, b, c, d uint32) int + func QScaleUint32(b, c, d uint32) (a uint64) + func QuadPolyDiscriminant(a, b, c int) (ds, d int, _ error) + func QuadPolyDiscriminantBig(a, b, c *big.Int) (ds, d *big.Int) + func SqrtBig(n *big.Int) (x *big.Int) + func SqrtUint64(n uint64) (x uint64) + func SubOverflowInt16(a, b int16) (r int16, ovf bool) + func SubOverflowInt32(a, b int32) (r int32, ovf bool) + func SubOverflowInt64(a, b int64) (r int64, ovf bool) + func SubOverflowInt8(a, b int8) (r int8, ovf bool) + func ToBase(n *big.Int, b int) []int + func UClamp(v, lo, hi uint) uint + func UMax(a, b uint) uint + func UMaxPtr(a, b *uint) *uint + func UMaxVal(val uint, vals ...uint) uint + func UMin(a, b uint) uint + func UMinPtr(a, b *uint) *uint + func UMinVal(val uint, vals ...uint) uint + func UintptrBits() int + type Approximation int + const Linear + const Sinusoidal + type FC32 struct + func NewFC32(lo, hi int, hq bool) (r *FC32, err error) + func (r *FC32) Cycle() int64 + func (r *FC32) Next() int + func (r *FC32) Pos() int64 + func (r *FC32) Prev() int + func (r *FC32) Seed(seed int64) + func (r *FC32) Seek(pos int64) + type FCBig struct + func NewFCBig(lo, hi *big.Int, hq bool) (r *FCBig, err error) + func (r *FCBig) Cycle() *big.Int + func (r *FCBig) Next() *big.Int + func (r *FCBig) Pos() *big.Int + func (r *FCBig) Prev() *big.Int + func (r *FCBig) Seed(seed int64) + func (r *FCBig) Seek(pos *big.Int) + type FactorTerm struct + Power uint32 + Prime uint32 + type FactorTerms []FactorTerm + func FactorInt(n uint32) (f FactorTerms) + type Int128 struct + Hi int64 + Lo int64 + func NewInt128FromFloat32(n float32) (r Int128) + func NewInt128FromFloat64(n float64) (r Int128) + func NewInt128FromInt64(n int64) (r Int128) + func NewInt128FromUint64(n uint64) (r Int128) + func (x *Int128) SetBigInt(y *big.Int) (r Int128, err error) + func (x *Int128) SetInt64(y int64) (r Int128) + func (x *Int128) SetUint64(y uint64) (r Int128) + func (x Int128) Add(y Int128) (r Int128, cy bool) + func (x Int128) BigInt() *big.Int + func (x Int128) Cmp(y Int128) int + func (x Int128) Neg() (r Int128, ok bool) + func (x Int128) Sign() int + func (x Int128) String() string + type PolyFactor struct + P int + Q int + func QuadPolyFactors(a, b, c int) (content int, primitivePart []PolyFactor, _ error) + type PolyFactorBig struct + P *big.Int + Q *big.Int + func QuadPolyFactorsBig(a, b, c *big.Int) (content *big.Int, primitivePart []PolyFactorBig) + type Uint128 struct + Hi uint64 + Lo uint64 + func NewUint128FromFloat32(n float32) (r Uint128) + func NewUint128FromFloat64(n float64) (r Uint128) + func NewUint128FromInt64(n int64) (r Uint128) + func NewUint128FromUint64(n uint64) (r Uint128) + func (x *Uint128) SetBigInt(y *big.Int) (r Uint128, err error)