NumberForge is a lightweight BigNumber library for Unity — built specifically for idle games, incremental games, and any project where values routinely blow past what a double or long can hold.
It gives you a single readonly struct with a clean, familiar API: standard arithmetic operators, implicit conversions from int, long and double, and full compatibility with Unity's Lerp and math patterns. Pick it up and start adding numbers in minutes.
Key features:
Arbitrarily large positive and negative numbers — mantissa/exponent representation with around 15 significant digits of precision at any scale
Four built-in display formats — Short (1.5K), Long (1.5 Thousand), Scientific (1.5e6), and Engineering (150e3)
FormatOptions per call — control decimal places, trailing zero trimming, and sign characters without changing any global state
Customizable suffix lists — subclass BigNumberNames and assign it once to replace K/M/B with any notation your game uses
Full math API — Add, Subtract, Multiply, Divide, Lerp, Abs, Min, Max, Clamp, Floor, Ceil, Sqrt, Pow, Log10
Mixed-type operators — combine BigNumber directly with int, long, and double without manual casting
TryParse and round-trip ToString — safe parsing from save data and string interpolation without surprises
IsZero, IsPositive, IsNegative convenience properties
IComparable, IEquatable, and IFormattable interfaces fully implemented
Serializable attribute — compatible with JSON serializers and custom save systems
Assembly definition included — clean integration with any project structure
Demo scene included — animated resource counter, live format comparison across all four notations, and a Lerp progress bar, ready to open and explore
For questions or issues, contact nregoblin@gmail.com — quick replies guaranteed.