Function note

MROUND counts a quotient within 5E-15 below a half up

FUNC.MROUND

FN-MROUND-001: MROUND counts a quotient within 5E-15 below a half up

Excel differs from the mathematical answer · measured · recorded 2026-11-04

MROUND(n,m) forms q = n/m on the x87 unit and stores it to binary64, counts floor(q), adds 1 when 0.5 - frac(q) <= 5E-15, and returns count*m from the x87 unit. A number just below a half therefore rounds up though it is nearer the lower multiple: 0.499999999999995 with multiple 1 gives 1, and the next binary64 below it gives 0. MROUND(6.05,0.1) stays 6, because its quotient 60.49999999999999 lies 7.1E-15 below the half.

Documentation: MROUND rounds up, away from zero, if the remainder of dividing number by multiple is greater than or equal to half the value of multiple. Source documentation

Call and input routeInputsExcelCorrect valueRecorded in
MROUND(0.499999999999995, 1)
cell-value2
number: 0.499999999999995
0x3fdfffffffffffa6
multiple: 1
0x3ff0000000000000
1
0x3ff0000000000000
0
0x0000000000000000
Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this capture
MROUND(0.49999999999999495, 1)
cell-value2
number: 0.49999999999999495
0x3fdfffffffffffa5
multiple: 1
0x3ff0000000000000
0
0x0000000000000000
—Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this capture
MROUND(0.49999999999999994, 1)
cell-value2
number: 0.49999999999999994
0x3fdfffffffffffff
multiple: 1
0x3ff0000000000000
1
0x3ff0000000000000
0
0x0000000000000000
Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this capture

Correct value: The number is nearer to 0 than to 1.

Correct value: The number is nearer to 0 than to 1.

Basis: All 50,782 recorded MROUND rows match this rule. The cut-off lies between the adjacent binary64 values 4.996E-15 (rounded up) and 5.0515E-15 (rounded down) from 0.5, measured at floor(q) = 0 over 4,264 rows.

Inferred: The window is measured between two neighbouring values; that the constant is the decimal 5E-15 is inferred, as the decimal in that window.

Evidence and capture sources

Machine-readable note records