Home · Resources · Why BigNumber

Why BigNumber for calculator outputs

Published . Reading time: about 3 minutes.

The problem with raw JavaScript numbers

JavaScript’s built-in IEEE-754 doubles are fast, but they accumulate rounding noise. For a calculator brand, that noise shows up as “ugly” tails (for example 0.1 + 0.2) and undermines trust. RapidRatio treats that as a product issue, not a micro-detail.

What we do instead

Tooling loads math.js in BigNumber mode with a generous digit workspace, then converts user input from strings with math.bignumber. Final values shown to users are formatted with math.format to a bounded precision, then trailing zeros are trimmed so the UI stays readable.

Where to see it

The live pattern is implemented in assets/js/core-engine.js and exercised on the Percentage Change Calculator. That page keeps all dynamic numeric output in text nodes—never interpolated into HTML strings from user input—consistent with our security rules.

When scientific notation is intentional

Some tools may deliberately choose scientific or engineering notation for very large or small magnitudes. The master architecture document calls that out as an allowed exception to the default formatting style.

Disclaimer. This article is general information about numeric presentation. It is not financial, engineering, or standards advice.

Browse the Resources hub for more guides, or open a Math calculator to see BigNumber output in context.