Documentation ¶
Overview ¶
Package arith provides simple, primarily bit-specific, arithmetic operations.
Package pow implements basic power functions.
Index ¶
- Constants
- func Abs(x int64) uint64
- func AbsCmp128(x, y, shift uint64) int
- func Add(z, x *big.Int, y uint64) *big.Int
- func Add128(x, y uint64) (z1, z0 uint64)
- func BigLength(x *big.Int) int
- func BigPow10(n uint64) *big.Int
- func Cmp(x, y uint64) int
- func CmpBits(x, y []big.Word) (r int)
- func Length(x uint64) int
- func Mul128(x, y uint64) (z1, z0 uint64)
- func MulUint64(z, x *big.Int, y uint64) *big.Int
- func Pow10(e uint64) (uint64, bool)
- func Pow10Int(e uint64) (int64, bool)
- func PowOfTen(x uint64) bool
- func PowOfTenBig(x *big.Int) bool
- func Safe(e uint64) bool
- func Set128(z *big.Int, z1, z0 uint64) *big.Int
- func Sub(z, x *big.Int, y uint64) *big.Int
- func Words(x uint64) []big.Word
Constants ¶
View Source
const ( // PowTabLen is the largest cached power for integers. PowTabLen = 20 // BigPowTabLen is the largest cached power for *big.Ints. BigPowTabLen = 1e5 )
View Source
const Is32Bit = bits.UintSize == 32
Variables ¶
This section is empty.
Functions ¶
func Pow10Int ¶
Pow10Int returns 10 ** e and a boolean indicating whether the result fits into an int64.
func PowOfTenBig ¶
PowOfTenBig returns true if x is a power of 10.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.