go/src/math/big/int_test.go

func isNormalized(x *Int) bool {}

type funZZ

type argZZ

var sumZZ

var prodZZ

func TestSignZ(t *testing.T) {}

func TestSetZ(t *testing.T) {}

func TestAbsZ(t *testing.T) {}

func testFunZZ(t *testing.T, msg string, f funZZ, a argZZ) {}

func TestSumZZ(t *testing.T) {}

func TestProdZZ(t *testing.T) {}

// mulBytes returns x*y via grade school multiplication. Both inputs
// and the result are assumed to be in big-endian representation (to
// match the semantics of Int.Bytes and Int.SetBytes).
func mulBytes(x, y []byte) []byte {}

func checkMul(a, b []byte) bool {}

func TestMul(t *testing.T) {}

var mulRangesZ

func TestMulRangeZ(t *testing.T) {}

func TestBinomial(t *testing.T) {}

func BenchmarkBinomial(b *testing.B) {}

var divisionSignsTests

func TestDivisionSigns(t *testing.T) {}

func norm(x nat) nat {}

func TestBits(t *testing.T) {}

func checkSetBytes(b []byte) bool {}

func TestSetBytes(t *testing.T) {}

func checkBytes(b []byte) bool {}

func TestBytes(t *testing.T) {}

func checkQuo(x, y []byte) bool {}

var quoTests

func TestQuo(t *testing.T) {}

func TestQuoStepD6(t *testing.T) {}

func BenchmarkQuoRem(b *testing.B) {}

var bitLenTests

func TestBitLen(t *testing.T) {}

var expTests

func TestExp(t *testing.T) {}

func BenchmarkExp(b *testing.B) {}

func BenchmarkExpMont(b *testing.B) {}

func BenchmarkExp2(b *testing.B) {}

func checkGcd(aBytes, bBytes []byte) bool {}

// euclidExtGCD is a reference implementation of Euclid's
// extended GCD algorithm for testing against optimized algorithms.
// Requirements: a, b > 0
func euclidExtGCD(a, b *Int) (g, x, y *Int) {}

func checkLehmerGcd(aBytes, bBytes []byte) bool {}

func checkLehmerExtGcd(aBytes, bBytes []byte) bool {}

var gcdTests

func testGcd(t *testing.T, d, x, y, a, b *Int) {}

func TestGcd(t *testing.T) {}

type intShiftTest

var rshTests

func TestRsh(t *testing.T) {}

func TestRshSelf(t *testing.T) {}

var lshTests

func TestLsh(t *testing.T) {}

func TestLshSelf(t *testing.T) {}

func TestLshRsh(t *testing.T) {}

var cmpAbsTests

func TestCmpAbs(t *testing.T) {}

func TestIntCmpSelf(t *testing.T) {}

var int64Tests

func TestInt64(t *testing.T) {}

var uint64Tests

func TestUint64(t *testing.T) {}

var bitwiseTests

type bitFun

func testBitFun(t *testing.T, msg string, f bitFun, x, y *Int, exp string) {}

func testBitFunSelf(t *testing.T, msg string, f bitFun, x, y *Int, exp string) {}

func altBit(x *Int, i int) uint {}

func altSetBit(z *Int, x *Int, i int, b uint) *Int {}

func testBitset(t *testing.T, x *Int) {}

var bitsetTests

func TestBitSet(t *testing.T) {}

var tzbTests

func TestTrailingZeroBits(t *testing.T) {}

func BenchmarkBitset(b *testing.B) {}

func BenchmarkBitsetNeg(b *testing.B) {}

func BenchmarkBitsetOrig(b *testing.B) {}

func BenchmarkBitsetNegOrig(b *testing.B) {}

// tri generates the trinomial 2**(n*2) - 2**n - 1, which is always 3 mod 4 and
// 7 mod 8, so that 2 is always a quadratic residue.
func tri(n uint) *Int {}

func BenchmarkModSqrt225_Tonelli(b *testing.B) {}

func BenchmarkModSqrt225_3Mod4(b *testing.B) {}

func BenchmarkModSqrt231_Tonelli(b *testing.B) {}

func BenchmarkModSqrt231_5Mod8(b *testing.B) {}

func TestBitwise(t *testing.T) {}

var notTests

func TestNot(t *testing.T) {}

var modInverseTests

func TestModInverse(t *testing.T) {}

func BenchmarkModInverse(b *testing.B) {}

// testModSqrt is a helper for TestModSqrt,
// which checks that ModSqrt can compute a square-root of elt^2.
func testModSqrt(t *testing.T, elt, mod, sq, sqrt *Int) bool {}

func TestModSqrt(t *testing.T) {}

func TestJacobi(t *testing.T) {}

func TestJacobiPanic(t *testing.T) {}

func TestIssue2607(t *testing.T) {}

func TestSqrt(t *testing.T) {}

// We can't test this together with the other Exp tests above because
// it requires a different receiver setup.
func TestIssue22830(t *testing.T) {}

func BenchmarkSqrt(b *testing.B) {}

func benchmarkIntSqr(b *testing.B, nwords int) {}

func BenchmarkIntSqr(b *testing.B) {}

func benchmarkDiv(b *testing.B, aSize, bSize int) {}

func BenchmarkDiv(b *testing.B) {}

func TestFillBytes(t *testing.T) {}

func TestNewIntMinInt64(t *testing.T) {}

func TestNewIntAllocs(t *testing.T) {}

func TestFloat64(t *testing.T) {}