From the same creators of Unreliable Remote Events, Roblox presents —
Unreliable Number — For when how a number looks is more important than what it actually is.
Well, just kidding… Kinda…
Why “Unreliable”?
Because it intentionally sacrifices numeric precision in favor of formatting consistency and performance.
In simulation games, if a player has "1000T"
, we don’t care if they have exactly 1,000,000,000,000,000
or a little more — we care that the number still reads as "1000T"
. It’s perception over perfection.
Think of it like this:
- Someone has 100.000.000 gold, and lets say that we have a precision of 8 digits (is adjustable the precision you want)
- That player, getting more 9 gold or losing, its meaningless to that player, he can’t feel it, so why bother about it?
- That’s what Unreliable is about, in this example, the last digit will always be 0, because is not an amount that matters to the player.
It’s not meant for accurate financial or scientific math.
Why Use This?
- Perfect for simulation games with infinite scaling economies
- Bypasses roblox max number limit (scales infinitely)
- Has more performance with huge numbers than other modules
- Handles numbers like
"100000000M"
with zero effort - Lightweight and Roblox-compatible
- Takes formatting seriously (something most number wrappers don’t!)
Feature / Module | BigNum | InfiniteMath | Gigantix | Unreliable Number |
---|---|---|---|---|
Primary Focus | Arbitrary-precision integers | Numbers beyond 1e308 | Efficient large-number math in Roblox | Number Scaling “Infinitely” while keeping a good performance |
Decimals | ![]() |
![]() |
![]() |
![]() |
Supports Suffixes | ![]() |
![]() |
![]() |
![]() |
Negatives Support | ![]() |
![]() |
![]() |
![]() |
Ideal Use Case | Complex math and precision | Handling huge numbers | Performance-focused number crunching | Simulation/idle games, UI display |
Math Precision | ![]() |
![]() |
![]() |
![]() |
Key Strength | Math fidelity | Extremely large float math | Fast Roblox-side simulation math | Format fidelity, marginal utility UX |
Installation
You can grab the module from here:
Roblox Asset
GitHub Source & Docs
local UnreliableNumber = require(path_to.UnreliableNumber)
Unreliable Number Module API
🛠️ Setup
Setup
Install and open the module, use ctrl+f to search for “config” and adjust the settings as you wish, this is the default values:
local config = {
significantDigits = 20, -- Maximum significant digits for the integer part
significantDecimals = 4, -- Maximum significant digits for the decimal part
roundingMode = "nearest", -- Rounding mode: "ceil", "floor", or "nearest"
autoNormalize = true, -- Auto normalize the number (recommended)
debug = false, -- Debug mode for testing, outputs extra information
}
Place the module in ReplicatedStorage
and import it on your script.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UnreliableNumber = require(ReplicatedStorage.UnreliableNumber)
🧱 Constructors
Constructors
UnreliableNumber.new(sign, integer, trailingZeros, decimal)
Create an instance directly.
local num = UnreliableNumber.new(1, "123", 0, "45") -- 123.45
UnreliableNumber.fromNumber(number)
Approximate from Lua number.
local approx = UnreliableNumber.fromNumber(1000.001)
UnreliableNumber.fromString(string)
Preserves original formatting.
local num = UnreliableNumber.fromString("00123.4500")
-- OR
local num2 = UnreliableNumber.newFromString("123.5_2") -- this is equals to 12300.5
UnreliableNumber.fromSuffix(string)
Supports suffixes like K/M/B/T…
local num = UnreliableNumber.fromSuffix("1.5K")
➕ Arithmetic
Arithmetic
All arithmetic returns new UnreliableNumber
instances. Also supports +/-*.
local a = UnreliableNumber.fromString("1000")
local b = UnreliableNumber.fromString("250")
local sum = a:add(b)
print(sum:toString()) -- ≈ "1250"
🧮 Methods Overview
Methods Overview
:add(other)
, :subtract(other)
, :multiply(other)
, :divide(other)
Performs approximate arithmetic.
:clone()
Returns a deep copy.
:removeDecimals()
Strips the decimal portion.
:shiftLeft(n)
/ :shiftRight(n)
Adjusts decimal position visually.
:normalize()
🔍 Comparison
Comparison
Lexical/formatted comparison only. Also support => for example:
if num1:isGreater(num2) then
print("Looks greater!")
end
Supported:
:isEqual()
:isGreater()
,:isLesser()
:isGreaterOrEquals()
,:isLesserOrEquals()
:compare()
(returns -1, 0, 1)
🔁 Conversion
Conversion
For number conversion:
local coins = UnreliableNumber.fromString("0001234.000")
coins:normalize({ trimLeadingZeros = true })
textLabel.Text = coins:toSuffix() -- "1.23K"
:toString()
→ Original or mutated full string:toFullNumber()
→ Integer + Decimal as string:toFullSuffix()
/:toSuffix()
→ Suffix notation:toNumber()
→ Lua number (approximate):serialize(raw)
→ String or number output