Generator

Five summation policies, 400 permutations each, and how many answers each returned

One function in the repro library, called 6 times across 1 essay. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 8 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws five summation policies, 400 permutations each, and how many answers each returned. The same 1,024 numbers, summation condition number 10⁸, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 303 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 4.96·10⁻¹⁰ and still returns 119. Pre-rounded summation returns one value, at an error of 4.91·10⁻⁶ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

permutation-census is one function in lib/figures/repro.js — one sum, several answers — what a reduction's division costs, and the two policies that remove it. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 10⁸, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 303 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 4.96·10⁻¹⁰ and still returns 119. Pre-rounded summation returns one value, at an error of 4.91·10⁻⁶ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator303eight pieces72compensated119pre-rounded1exact1worst error 1.17·10⁻⁸worst error 4.61·10⁻⁹worst error 4.96·10⁻¹⁰worst error 4.91·10⁻⁶worst error 0bitwise, or not at allpermutations400one accumulator303pre-rounded1its error4.9·10⁻⁶compensated error5·10⁻¹⁰accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 10⁸, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 303 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 4.96·10⁻¹⁰ and still returns 119. Pre-rounded summation returns one value, at an error of 4.91·10⁻⁶ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

trials: 400

The arguments are the ones The sum that cannot be wrong passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 10⁸, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 303 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 4.96·10⁻¹⁰ and still returns 119. Pre-rounded summation returns one value, at an error of 4.91·10⁻⁶ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator303eight pieces72compensated119pre-rounded1exact1worst error 1.17·10⁻⁸worst error 4.61·10⁻⁹worst error 4.96·10⁻¹⁰worst error 4.91·10⁻⁶worst error 0bitwise, or not at allpermutations400one accumulator303pre-rounded1its error4.9·10⁻⁶compensated error5·10⁻¹⁰accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 10⁸, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 303 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 4.96·10⁻¹⁰ and still returns 119. Pre-rounded summation returns one value, at an error of 4.91·10⁻⁶ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

logKappa: 2

The arguments are the ones The sum that cannot be wrong passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 101, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 62 values and eight pieces return 37; Kahan's compensated loop is the most accurate of the three at 6.35·10⁻¹⁶ and still returns 6. Pre-rounded summation returns one value, at an error of 5.57·10⁻¹² — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator62eight pieces37compensated6pre-rounded1exact1worst error 1.19·10⁻¹⁴worst error 4.66·10⁻¹⁵worst error 6.35·10⁻¹⁶worst error 5.57·10⁻¹²worst error 0bitwise, or not at allpermutations400one accumulator62pre-rounded1its error5.6·10⁻¹²compensated error6.3·10⁻¹⁶accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 101, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 62 values and eight pieces return 37; Kahan's compensated loop is the most accurate of the three at 6.35·10⁻¹⁶ and still returns 6. Pre-rounded summation returns one value, at an error of 5.57·10⁻¹² — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

logKappa: 4

The arguments are the ones The sum that cannot be wrong passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 10⁴, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 316 values and eight pieces return 73; Kahan's compensated loop is the most accurate of the three at 5.49·10⁻¹⁴ and still returns 122. Pre-rounded summation returns one value, at an error of 4.56·10⁻¹⁰ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator316eight pieces73compensated122pre-rounded1exact1worst error 10⁻¹²worst error 4.77·10⁻¹³worst error 5.49·10⁻¹⁴worst error 4.56·10⁻¹⁰worst error 0bitwise, or not at allpermutations400one accumulator316pre-rounded1its error4.6·10⁻¹⁰compensated error5.5·10⁻¹⁴accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 10⁴, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 316 values and eight pieces return 73; Kahan's compensated loop is the most accurate of the three at 5.49·10⁻¹⁴ and still returns 122. Pre-rounded summation returns one value, at an error of 4.56·10⁻¹⁰ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

logKappa: 6

The arguments are the ones The sum that cannot be wrong passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 10⁶, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 290 values and eight pieces return 69; Kahan's compensated loop is the most accurate of the three at 5.76·10⁻¹² and still returns 117. Pre-rounded summation returns one value, at an error of 4.58·10⁻⁸ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator290eight pieces69compensated117pre-rounded1exact1worst error 1.03·10⁻¹⁰worst error 4.48·10⁻¹¹worst error 5.76·10⁻¹²worst error 4.58·10⁻⁸worst error 0bitwise, or not at allpermutations400one accumulator290pre-rounded1its error4.6·10⁻⁸compensated error5.8·10⁻¹²accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 10⁶, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 290 values and eight pieces return 69; Kahan's compensated loop is the most accurate of the three at 5.76·10⁻¹² and still returns 117. Pre-rounded summation returns one value, at an error of 4.58·10⁻⁸ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

logKappa: 10

The arguments are the ones The sum that cannot be wrong passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Five summation policies, 400 permutations each, and how many answers each returnedThe same 1,024 numbers, summation condition number 10¹⁰, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 310 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 5.75·10⁻⁸ and still returns 122. Pre-rounded summation returns one value, at an error of 4.6·10⁻⁴ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.distinct answersone accumulator310eight pieces72compensated122pre-rounded1exact1worst error 1.09·10⁻⁶worst error 4.74·10⁻⁷worst error 5.75·10⁻⁸worst error 4.6·10⁻⁴worst error 0bitwise, or not at allpermutations400one accumulator310pre-rounded1its error4.6·10⁻⁴compensated error5.8·10⁻⁸accuracy and agreement are different propertiesand the accurate one is not the agreed one

The same 1,024 numbers, summation condition number 10¹⁰, presented in 400 different orders. The bar is the number of distinct binary64 values the policy returned; the figure beside it is the worst relative error it made. A single accumulator returns 310 values and eight pieces return 72; Kahan's compensated loop is the most accurate of the three at 5.75·10⁻⁸ and still returns 122. Pre-rounded summation returns one value, at an error of 4.6·10⁻⁴ — four orders worse than the compensated loop and the same on every machine. Exact accumulation returns one value and the right one. The comparison is bitwise because the claim is bitwise: a tolerance here would pass everything.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

8 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

a cancellation the arithmetic can resolve

a width that leaves room to accumulate

and the three that were not designed to be are not

compensated summation is the more accurate and the less reproducible

enough permutations to be a census and few enough to build

one pass or two

the accumulator cannot overflow the significand

the two policies designed to be order-independent are

Against the rule

The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.

Across the library: the rule bites on 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · All essays · What must fail