FN-ROUNDUP-002: ROUNDUP adds its unit in binary64, one bit from the decimal answer
Excel differs from the mathematical answer · measured · recorded 2026-11-04
ROUNDUP forms the ROUNDDOWN result, converts it to binary64, converts one unit 10^-p to binary64, and adds the two on the x87 unit, storing the sum to binary64. The sum need not be the binary64 value nearest the decimal answer, so ROUNDUP(-1.125,2) is -1.1300000000000001 and ROUNDUP(3.535,2) is 3.5399999999999996. The difference shows when the result is compared with a typed 3.54.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
ROUNDUP(-1.125, 2)cell-value2 | number: -1.1250xbff2000000000000num_digits: 20x4000000000000000 | -1.13000000000000010xbff2147ae147ae15 | -1.130xbff2147ae147ae14 | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
ROUNDUP(3.535, 2)cell-value2 | number: 3.5350x400c47ae147ae148num_digits: 20x4000000000000000 | 3.53999999999999960x400c51eb851eb851 | 3.540x400c51eb851eb852 | Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H |
Correct value: The decimal answer has a nearest binary64 value; rounding away from zero at 2 places gives that value.
Correct value: The decimal answer has a nearest binary64 value; rounding away from zero at 2 places gives that value.
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.
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/ROUNDUP.jsonl.gz 4d5320dfdc385354469b4d506153357bb932ab08 · line 1863, key ROUNDUP|0xbff2000000000000|0x4000000000000000
- CalcFunc-Evidence · cache/oracle-20430/build-20430/ROUNDUP.jsonl.gz 4d5320dfdc385354469b4d506153357bb932ab08 · line 1809, key ROUNDUP|0x400c47ae147ae148|0x4000000000000000