FN-ROUND-002: The rounding functions read 15 digits first, so ROUNDDOWN can round up
Excel differs from the mathematical answer · measured · recorded 2026-11-04
Before choosing a digit these functions read the number to 15 significant digits on the x87 unit: with e the decimal exponent and n = 14 - e, y = RN64(|x| * 10^n), or RN64(|x| / 10^-n) when n is negative, while 10^|n| is exact in 64 bits (|n| <= 27). A half in y goes up for ROUNDDOWN, ROUNDUP and TRUNC and down for ROUND. So digits beyond the 15th are lost even when the requested precision keeps them: ROUND(-1594628480062905,14) loses its last digit, and ROUNDDOWN(283025097725723.5,0) returns 283025097725724, larger than its input.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
ROUND(-1594628480062905, 14)cell-value2 | number: -15946284800629050xc316a939806956e4num_digits: 140x402c000000000000 | -15946284800629000xc316a939806956d0 | -15946284800629050xc316a939806956e4 | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
ROUNDDOWN(283025097725723.5, 0)cell-value2 | number: 283025097725723.50x42f0168ea69971b8num_digits: 00x0000000000000000 | 2830250977257240x42f0168ea69971c0 | 2830250977257230x42f0168ea69971b0 | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
Correct value: An integer rounded to 14 places is itself.
Correct value: ROUNDDOWN drops the fraction .5.
Basis: Under the family rules the recorded rows match ROUND 36,821 of 36,945, ROUNDUP 52,022 of 52,841, ROUNDDOWN 59,182 of 59,995 and TRUNC 50,504 of 51,317, with no row lost and each remaining failure classified in the write-up.
Open: How the scale is formed for |n| > 27: a single correctly rounded 64-bit power and the chained multiplications tried do not fit; 123 ROUND, 548 ROUNDUP, 556 ROUNDDOWN and 555 TRUNC rows remain.
Open: The reading step itself: one control at n = -10 misses the single RN64 step by just over half a unit, so that step is an approximation of the real one even for |n| <= 27. It stays because it gains rows and loses none.
Evidence and capture sources
- DnaCalc · crates/calc-func/src/catalogue/rounding.rs ab94fb91a50fbdf89bdb2dac0e12fcd77a5e5f82 · the rules in the product; the commit message carries the row counts
- ExcelFunctionsHandbook · content/notes/evidence/2026-11-04/rounding-EVIDENCE.md b5d84a80a5a4640eca9ce04f232c0bc115503f34 · research write-up: full-bank result, the rules, what stays open
- CalcFunc-Evidence · cache/oracle-20430/build-20430/ROUND.jsonl.gz 4d5320dfdc385354469b4d506153357bb932ab08 · line 3758, key ROUND|0xc316a939806956e4|0x402c000000000000
- CalcFunc-Evidence · cache/oracle-20430/build-20430/ROUNDDOWN.jsonl.gz 4d5320dfdc385354469b4d506153357bb932ab08 · line 753, key ROUNDDOWN|0x42f0168ea69971b8|0x0000000000000000