namespace
BigInt
Arbitrary-precision integers with no upper bound, for idle/incremental counters, exact huge currencies, and score arithmetic that a 32- or 64-bit int would overflow. A BigInt is a sign-magnitude number stored as base-1e9 limbs, so every operation is exact and therefore deterministic — bit-identical on every platform, with no binary floating point. Build one with BigInt.from (an int) or BigInt.parse (decimal text), combine with add / sub / mul / pow / div / mod, compare with cmp / eq / is_zero, and render with str. Arguments are positional. The runtime is spliced in only when a program mentions BigInt.*.
BigInt.from(value) -> BigIntTurn a plain int into a BigInt.BigInt.parse(text) -> BigIntParse decimal text into a BigInt.BigInt.add(a, b) -> BigIntExact sum of two big integers.BigInt.sub(a, b) -> BigIntExact difference of two big integers.BigInt.mul(a, b) -> BigIntExact product of two big integers.BigInt.neg(a) -> BigIntNegate a big integer.BigInt.pow(a, exp) -> BigIntRaise a big integer to an int power.BigInt.div(a, d) -> BigIntDivide a big integer by an int (toward zero).BigInt.mod(a, d) -> intRemainder of a big integer divided by an int.BigInt.cmp(a, b) -> intCompare two big integers: -1, 0, or 1.BigInt.eq(a, b) -> boolTrue when two big integers are equal.BigInt.is_zero(a) -> boolTrue when a big integer is zero.BigInt.to_int(a) -> intNarrow a big integer to a plain int (clamped).BigInt.str(a) -> stringRender a big integer as decimal text.