package
0.0.0-20181122101859-297441e03548
Repository: https://github.com/cznic/mathutil.git
Documentation: pkg.go.dev
# README
Install: $ go get github.com/cznic/mathutil/mersenne Godocs: http://gopkgdoc.appspot.com/pkg/github.com/cznic/mathutil/mersenne
# Functions
FromFactorBigInt returns n such that d | Mn if n <= max and d is odd.
HasFactorBigInt returns true if d | Mn, d > 0.
HasFactorBigInt2 returns true if d | Mn, d > 0.
HasFactorUint32 returns true if d | Mn.
HasFactorUint64 returns true if d | Mn.
Mod sets mod to n % Mexp and returns mod.
ModPow returns b^Me % Mm.
ModPow2 returns x such that 2^Me % Mm == 2^x.
New returns Mn == 2^n-1 for n <= math.MaxInt32 or nil otherwise.
ProbablyPrime returns true if Mn is prime or is a pseudoprime to base a.