How to use this calculator
- Enter or choose x.
- Enter or choose operation.
- Enter or choose y.
- Enter or choose decimal places for division.
- The result updates as you type. Use Copy result or Share to keep it.
Method
Each number is held as an integer of any length with a decimal scale: X = m ÷ 10ˢ. Addition, subtraction, multiplication and whole powers are exact; division rounds half up at the chosen decimal place
- m
- all the digits as one integer
- s
- the number of decimal places
Worked example
- 2¹⁰ = 1024, so 2¹⁰⁰ = 1024¹⁰, about 1.27 × 10³⁰.
- Multiplying out with every digit kept gives 1,267,650,600,228,229,401,496,703,205,376.
- That is 31 digits; ordinary double-precision arithmetic keeps only the first 16 or so (1.267650600228229 × 10³⁰).
2¹⁰⁰ = 1267650600228229401496703205376 exactly.
What the result means
Use this when the last digits matter: checking cryptography or number-theory examples, exact factorial-sized products, or showing that 0.1 + 0.2 is exactly 0.3 in decimal.
Assumptions and limits
- Mod uses truncated division, so the remainder has the sign of X (as in most programming languages).
- Results are limited to about 200,000 digits.
- Powers must be whole numbers; roots and logarithms are not supported.
Questions
Why does my phone show 0.30000000000000004 for 0.1 + 0.2?
Most software stores numbers in binary floating point, where 0.1 has no exact representation. This calculator stores decimal digits exactly.
How precise is division?
Division gives as many decimal places as you ask for, up to 1,000, rounded half up; the result is marked exact when the division terminates.