THE FOLD / GRIND / THE GRINDSTONE / THE DOUBLE ROUNDING
THE DOUBLE ROUNDING
correctness does not compose
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Round a value to three decimals, then round that to one. You will sometimes get a different answer than rounding the original straight to one — because the first rounding can push a value across the boundary the second one is looking at.
LIT verified live. 1,000,000 values swept from 0 to 10. Rounding once to one decimal and rounding twice via three decimals disagree 4,996 times — 0.4996%. At 0.0495, rounding once gives 0 and rounding twice gives 0.1: the intermediate step turned it into 0.05, which then rounded up.
LIT verified live. 1,000,000 values swept from 0 to 10. Rounding once to one decimal and rounding twice via three decimals disagree 4,996 times — 0.4996%. At 0.0495, rounding once gives 0 and rounding twice gives 0.1: the intermediate step turned it into 0.05, which then rounded up.
2 HOW IT WAS WEAVED · AI + HUMAN
Double rounding is why x87’s 80-bit intermediates were a correctness problem rather than a bonus, and why IEEE 754 specifies a single correctly-rounded result for each operation.
AVAN (AI) swept a million values rather than presenting the boundary case, because 0.4996% is the useful number: roughly one value in two hundred. It is rare enough to survive testing and common enough to appear in production, which is the worst possible frequency for a defect.
AVAN (AI) swept a million values rather than presenting the boundary case, because 0.4996% is the useful number: roughly one value in two hundred. It is rare enough to survive testing and common enough to appear in production, which is the worst possible frequency for a defect.
3 ONE DIMENSION
Where the two paths disagree, across the sweep.
4 TWO DIMENSIONS · INTERACTIVE
Walk to a disagreement and watch the intermediate move it.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a value crossing a line it had not reached.
AVAN’s addition (the inverse-companion): the forward reading is that intermediate precision causes double rounding errors. The inverse is that the extra precision was correct at every step. Rounding to three decimals is right; rounding that to one is right; the composition is wrong, and no individual operation misbehaved. Read backwards, correctness does not compose — a chain of individually correct roundings is not a correct rounding, and that is why the standard specifies results rather than steps.
LIT 1,000,000 values swept from 0 to 10 give 4,996 disagreements between rounding once to one decimal and rounding twice via three - 0.4996%, roughly one value in two hundred - and at 0.0495 rounding once gives 0 while rounding twice gives 0.1, because the intermediate step turned it into 0.05 which then rounded up
FIG Double rounding is why x87's 80-bit intermediates were a correctness problem rather than a bonus, and why IEEE 754 specifies a single correctly-rounded result for each operation. AVAN swept a million values rather than presenting the boundary case, because 0.4996% is the useful number: rare enough to survive testing and common enough to appear in production, which is the worst possible frequency for a defect.
FIG Double rounding is why x87's 80-bit intermediates were a correctness problem rather than a bonus, and why IEEE 754 specifies a single correctly-rounded result for each operation. AVAN swept a million values rather than presenting the boundary case, because 0.4996% is the useful number: rare enough to survive testing and common enough to appear in production, which is the worst possible frequency for a defect.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GRINDSTONE · David Lee Wise (ROOT0), with AVAN