math/big — validation proof

Go’s own math/big test suite, converted to C# by go2cs, built against the converted standard library, run under the Go-semantics test host, and compared verdict for verdict against a clean go test -json baseline of the same sources. This page is generated by the converter from that comparison — it is the evidence behind the math/big row in Validated Test Packages.

Validated 2026-10-25 · converter 3e3f18925

248 matched · 3 disclosed — Go 1.26.10, windows/amd64, converted package src/core/math/big.

Measured at Release (tiered JIT off), oracle go version go1.26.10 windows/amd64.

Verdicts

Test go test go2cs
TestAbsZ pass pass
TestAdd pass pass
TestAddMulVVWW pass pass
TestAddVV pass pass
TestAddVW pass pass
TestAliasing pass pass
TestAliasing/Abs pass pass
TestAliasing/Add pass pass
TestAliasing/And pass pass
TestAliasing/AndNot pass pass
TestAliasing/Div pass pass
TestAliasing/Exp-XY pass pass
TestAliasing/Exp-XZ pass pass
TestAliasing/Exp-YZ pass pass
TestAliasing/GCD pass pass
TestAliasing/GCD-X pass pass
TestAliasing/GCD-Y pass pass
TestAliasing/Issue72043a pass pass
TestAliasing/Issue72043b pass pass
TestAliasing/Issue72043c pass pass
TestAliasing/Lsh pass pass
TestAliasing/Mod pass pass
TestAliasing/ModInverse pass pass
TestAliasing/ModSqrt pass pass
TestAliasing/Mul pass pass
TestAliasing/Neg pass pass
TestAliasing/Not pass pass
TestAliasing/Or pass pass
TestAliasing/Quo pass pass
TestAliasing/Rand pass pass
TestAliasing/Rem pass pass
TestAliasing/Rsh pass pass
TestAliasing/Set pass pass
TestAliasing/SetBit pass pass
TestAliasing/Sqrt pass pass
TestAliasing/Sub pass pass
TestAliasing/Xor pass pass
TestAppendText pass pass
TestBinomial pass pass
TestBit pass pass
TestBitLen pass pass
TestBitSet pass pass
TestBits pass pass
TestBitwise pass pass
TestBytes pass pass
TestCalibrate pass pass
TestCmp pass pass
TestCmpAbs pass pass
TestDecimalInit pass pass
TestDecimalRounding pass pass
TestDecimalString pass pass
TestDenomRace pass pass
TestDivWW pass pass
TestDivisionSigns pass pass
TestEscape pass pass
TestExp pass pass
TestExpNN pass pass
TestFibo pass pass
TestFillBytes pass pass
TestFillBytes/-0xffffffff pass pass
TestFillBytes/0 pass pass
TestFillBytes/0x10000000000000000 pass pass
TestFillBytes/0xabababababababababababababababababababababababababa pass pass
TestFillBytes/0xffffffff pass pass
TestFillBytes/0xffffffffffffffff pass pass
TestFillBytes/0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff pass pass
TestFillBytes/1000 pass pass
TestFloat32Distribution pass pass
TestFloat32SpecialCases pass pass
TestFloat64 pass pass
TestFloat64Distribution pass pass
TestFloat64SpecialCases pass pass
TestFloat64Text pass pass
TestFloatAbs pass pass
TestFloatAdd pass pass
TestFloatAdd32 pass pass
TestFloatAdd64 pass pass
TestFloatAddRoundZero pass pass
TestFloatAppendText pass pass
TestFloatAppendTextNil pass pass
TestFloatArithmeticOverflow pass pass
TestFloatArithmeticRounding pass pass
TestFloatArithmeticSpecialValues pass pass
TestFloatCmpSpecialValues pass pass
TestFloatCorruptGob pass pass
TestFloatFloat32 pass pass
TestFloatFloat64 pass pass
TestFloatFormat pass pass
TestFloatGobDecodeInvalid pass pass
TestFloatGobDecodeShortBuffer pass pass
TestFloatGobEncoding pass pass
TestFloatInc pass pass
TestFloatInt pass pass
TestFloatInt64 pass pass
TestFloatIsInt pass pass
TestFloatJSONEncoding pass pass
TestFloatMantExp pass pass
TestFloatMantExpAliasing pass pass
TestFloatMinPrec pass pass
TestFloatMul pass pass
TestFloatMul64 pass pass
TestFloatNeg pass pass
TestFloatPrec pass pass
TestFloatPredicates pass pass
TestFloatQuo pass pass
TestFloatQuoSmoke pass pass
TestFloatRat pass pass
TestFloatRound pass pass
TestFloatRound24 pass pass
TestFloatScan pass pass
TestFloatSetFloat64 pass pass
TestFloatSetFloat64String pass pass
TestFloatSetInf pass pass
TestFloatSetInt pass pass
TestFloatSetInt64 pass pass
TestFloatSetMantExp pass pass
TestFloatSetPrec pass pass
TestFloatSetRat pass pass
TestFloatSetUint64 pass pass
TestFloatSign pass pass
TestFloatSqrt pass pass
TestFloatSqrt64 pass pass
TestFloatSqrtSpecial pass pass
TestFloatString pass pass
TestFloatText pass pass
TestFloatUint64 pass pass
TestFloatZeroValue pass pass
TestFormat pass pass
TestFromBits pass pass
TestFunVWW pass pass
TestGcd pass pass
TestGetString pass pass
TestGobEncodingNilIntInSlice pass pass
TestGobEncodingNilRatInSlice pass pass
TestHilbert pass pass
TestInt64 pass pass
TestIntAppendText pass pass
TestIntAppendTextNil pass pass
TestIntCmpSelf pass pass
TestIntGobEncoding pass pass
TestIntJSONEncoding pass pass
TestIntJSONEncodingNil pass pass
TestIntText pass pass
TestIntXMLEncoding pass pass
TestIsFinite pass pass
TestIsInt pass pass
TestIssue20490 pass pass
TestIssue22830 pass pass
TestIssue2379 pass pass
TestIssue2607 pass pass
TestIssue31084 pass pass
TestIssue31184 pass pass
TestIssue34919 pass pass
TestIssue3521 pass pass
TestIssue37499 pass pass
TestIssue42552 pass pass
TestIssue42838 pass pass
TestIssue45910 pass pass
TestIssue6866 pass pass
TestIssue820 pass pass
TestJacobi pass pass
TestJacobiPanic pass pass
TestLinkerGC pass pass
TestLsh pass pass
TestLshRsh pass pass
TestLshSelf pass pass
TestLshVU pass pass
TestLucasPseudoprimes pass pass
TestMaxBase pass pass
TestMillerRabinPseudoprimes pass pass
TestModInverse pass pass
TestModSqrt pass pass
TestModW pass pass
TestMontgomery pass pass
TestMul pass pass
TestMulAddVWW pass pass
TestMulAddWWW pass pass
TestMulAlloc pass pass
TestMulBits pass pass
TestMulRangeN pass pass
TestMulRangeZ pass pass
TestMulUnbalanced pass fail (disclosed)
TestMulWW pass pass
TestNLZ pass pass
TestNatDiv pass pass
TestNatMul pass pass
TestNatMul/Basic pass pass
TestNatMul/Karatsuba pass pass
TestNatMul/Mul pass pass
TestNatSqr pass pass
TestNatSqr/Basic pass pass
TestNatSqr/Karatsuba pass pass
TestNatSqr/Sqr pass pass
TestNatSubMod2N pass pass
TestNatSubMod2N/aliasX pass pass
TestNatSubMod2N/aliasY pass pass
TestNatSubMod2N/noalias pass pass
TestNewIntAllocs pass fail (disclosed)
TestNewIntMinInt64 pass pass
TestNormBits pass pass
TestNot pass pass
TestProbablyPrime pass pass
TestProdZZ pass pass
TestQuo pass pass
TestQuoStepD6 pass pass
TestRatAbs pass pass
TestRatAppendText pass pass
TestRatBin pass pass
TestRatCmp pass pass
TestRatGobDecodeShortBuffer pass pass
TestRatGobEncoding pass pass
TestRatInv pass pass
TestRatJSONEncoding pass pass
TestRatNeg pass pass
TestRatScan pass pass
TestRatSetFrac64Rat pass pass
TestRatSetInt64 pass pass
TestRatSetString pass pass
TestRatSetStringZero pass pass
TestRatSetUint64 pass pass
TestRatSign pass pass
TestRatXMLEncoding pass pass
TestRsh pass pass
TestRshSelf pass pass
TestRshVU pass pass
TestScan pass pass
TestScanBase pass pass
TestScanExponent pass pass
TestScanPi pass pass
TestScanPiParallel pass pass
TestSet pass pass
TestSetBytes pass pass
TestSetFloat64NonFinite pass pass
TestSetString pass pass
TestSetZ pass pass
TestShiftLeft pass pass
TestShiftOverlap pass pass
TestShiftRight pass pass
TestSignZ pass pass
TestSqrAlloc pass fail (disclosed)
TestSqrt pass pass
TestSticky pass pass
TestString pass pass
TestStringPowers pass pass
TestSub pass pass
TestSubVV pass pass
TestSubVW pass pass
TestSumZZ pass pass
TestTrailingZeroBits pass pass
TestUint64 pass pass
TestZeroRat pass pass

Disclosed divergences

A disclosed divergence is a specific Go assertion this conversion does not satisfy — not a skipped test and not a tolerance. Each one is pinned by exact failure signature in the package’s hand-owned go2cs_test_disclosures.json; a disclosed test that fails any other way is still a hard mismatch.

The Class column says which kind each one is: a deferred entry is an assertion the managed CLR can meet, pinned against the named plan that will retire it; every other class is one it provably cannot satisfy.

Test Class Pinned reason
TestMulUnbalanced deferred A MemStats BYTES meter, not an AllocsPerRun one: allocBytes reads runtime.MemStats.TotalAlloc around one nat.mul of a 50,000-word by a 40-word operand and asserts the bytes stay under 10 times the inputs’ size. It read pass|pass at go1.24.13; go1.26.10 hands nat.mul a preallocated getStack() stack, which is how Go stays near 1x (its one ~400 KB result). ROOTED by G at f8fe15c97e, with a thread-precise probe inside the converted test (scratch, never committed). The stack is reused correctly: save, nat and restore cost 0 bytes. The excess is about 4.2 KB in each of the ~1,249 40x40 products. 74% of it is one converted construct: an element address-of whose only use is an identity compare. alias()’s &x[cap-1] == &y[cap-1] mints two 184-byte element boxes per call and nat.mul calls it twice, across four mul frames per product (2,944 B); addVW’s &z[0] != &x[0] adds 144 B. Another 21% is karatsuba’s nine non-escaping &Int{...} locals at 96 B each (864 B, the REC-B class). The rest is karatsuba’s defer (~216 B) and basicMul (56 B). Go allocates none of these.
TestNewIntAllocs deferred A want-zero AllocsPerRun assert over x.Add(x, NewInt(n)): NewInt is arranged to inline so that its &Int{...} and its one-word abs slice live on Go’s stack. The divergence is an ORACLE-side change, not a C# regression. The test body, NewInt and Int.Add are byte-for-byte the same at go1.24.13 and go1.26.10, and the go1.24.13 page reads fail on both sides: Go failed this test too, so it matched. At go1.26.10 Go passes it, and C# still allocates, so it now reads Go=pass / C#=fail.
TestSqrAlloc deferred AllocsPerRun assert new at go1.26.10 (escape_test.go:43-50): squaring an 80-word nat through Mul(x, x) must allocate at most once (the result). go1.26.10’s multiplication takes its scratch from a stack (natmul.go, getStack), which Go keeps off the heap; the converted side heap-allocates that scratch and reads 4.00 objects per run on both OSes. Same Go-side change as the TestMulUnbalanced entry beside it.

Excluded declarations

Declarations filtered from both sides of the comparison, and therefore not claimed above: Benchmark, Fuzz and Example declarations the converted host does not execute, plus any test requiring a capability the managed runtime does not provide — a testing member the host has not implemented, or a platform behavior it provably cannot reproduce. Each is named with the capability it needs.