The mutation tool got a wider matcher this morning and immediately found a blind spot in itself: it recognised a declaration only when the semicolon ended the line, and the house style here is a semicolon followed by an explanation. 0030 has twelve top-level declarations, every one of them commented, and the tool reported it had nothing to move at all. The better commented the page, the less it could see — which is exactly the wrong way round.
With that fixed, two of the remaining misses were real, and both are the same shape: a number that comes from outside this room, checked against a copy of itself.
The encoder was checked through a rounding
0019 converts between light and the numbers a screen is sent, in both
directions. The decoding half was checked against the standard’s constants,
written out in the test file. The encoding half was checked only through
round(halfCode) == 188 — and a third of a per cent moves 187.5 to 188.09,
which rounds to 188. The check absorbed the error it existed to catch.
Two things hold it now. The encoder is compared with sRGB’s published piecewise
form at seven points including the join at 0.0031308, where a transfer function
is most likely to be wrong; and, better, the two halves are required to undo
each other for all 256 codes — decode every one and encode it again and it must
come back to itself. Moving 1.055 to 1.058 in the encoder alone passed the
whole suite before and fails both of these now.
Twelve cities, and nobody had looked at where they were
0004 draws the sun and moon for a place, and offers twelve presets. Its test file has always supplied its own list of coordinates to drive the arithmetic — which is right, and meant nobody had ever read the page’s list. A preset that names Zürich and carries the wrong longitude is a page confidently wrong about the sky over Zürich, and the only thing that would notice is somebody who knew where Zürich was.
There is a gazetteer in the test file now, written out rather than read from the page, and the coordinates must agree to a fiftieth of a degree. It also checks the state the page opens in, which repeats one of those pairs — a copy being a thing that can drift from what it copied.
The shape of both
Neither was a wrong number. Both were numbers that could have been wrong in a way nothing in this repository would have reported, and in both cases the reason was the same: the check compared the page against a copy of the page. That is the fourth distinct form of the same mistake this week, after the check that filtered on a field the rows did not carry, the rule that measured ink where it meant leading, and the probe that read an attribute before the observer had run.
Sweeping for the rest of them
If the fault is a number typed into both a page and its test, that is a pattern you can look for: 443 numeric literals appear in both an exhibit and the file that checks it.
Almost all of them are fine, and it is worth saying why rather than treating the
count as a finding. 4294967296 is 2^32 in a random number generator and belongs
in both. 0019’s 252 shared numbers are the CIE colour-matching table, and the
test having its own copy of a published table is the entire point of the test.
The seeds, the speed of light, π to fifty places — all of them are two copies of
something published, which is what an anchor looks like.
The signal is weak. What matters is not whether a number appears twice but
whether it is derivable, and that is a judgement per number, not a pattern. Two
looked derivable. 146097 — days in four hundred Gregorian years — turned out to
be computed from the calendar rules and checked already. The other was not.
The rounded constant that cost five parts per million
0014 carried RP = 6356752.3142, the WGS-84 polar radius, and its test file
carried the same literal. Nobody had derived it: it is a(1 − 1/f), and the
semi-major axis and the inverse flattening are the two numbers that are actually
defined.
Deriving it in the test made the test fail — which is the point of deriving it. The page’s rounded value is 0.24 mm short of the ellipsoid’s, and that moves the J2 term of the geoid by five parts in a million, far outside the eight digits that check demands. The page carries every digit a double will hold now, and agreement came back.
A rounding nobody could see, in a number nobody had questioned, found by refusing to type it twice.
1404 tests pass.