Pin the 1972 hand-over to the leap seconds from the later side too
The test named for the hand-over caught the switch moved earlier and passed with it moved up to six months later: both samples round midnight then fall on the polynomial (a step of about 0), the last day of 1971 still reads 42.2485 s, and the 1972-06-30 = 42.184 check only sees a move past June. Such a switch leaves TT - UT up to 0.59 s high through the first half of 1972. The test now also requires 1 January 1972 itself to read the table's 42.184 s, the 10 s TAI - UTC began with plus 32.184. Control: the switch moved to JD_1972 + 120 now fails "hands over from the polynomial to the leap seconds at the start of 1972" only (1 failed, 843 passed of 844); before, the suite passed 841 of 841. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,11 @@ describe('ttMinusUtSeconds', () => {
|
|||||||
|
|
||||||
it('hands over from the polynomial to the leap seconds at the start of 1972, 0.07 s apart', () => {
|
it('hands over from the polynomial to the leap seconds at the start of 1972, 0.07 s apart', () => {
|
||||||
// The switch is placed by the calendar, not by a 365.2425-day year, so it is sampled on either
|
// The switch is placed by the calendar, not by a 365.2425-day year, so it is sampled on either
|
||||||
// side of midnight; and the last day of 1971 must still be the polynomial's 42.25 s, not the
|
// side of midnight; the last day of 1971 must still be the polynomial's 42.25 s, not the table's
|
||||||
// table's 42.184, or the switch has moved.
|
// 42.184, or the switch has moved earlier; and midnight itself must already be the table's, or it
|
||||||
|
// has moved later, which the step alone cannot see once both samples fall on the polynomial.
|
||||||
const start = jd(1972);
|
const start = jd(1972);
|
||||||
|
expect(ttMinusUtSeconds(start)).toBe(42.184);
|
||||||
expect(Math.abs(ttMinusUtSeconds(start) - ttMinusUtSeconds(start - 1e-6))).toBeLessThan(0.1);
|
expect(Math.abs(ttMinusUtSeconds(start) - ttMinusUtSeconds(start - 1e-6))).toBeLessThan(0.1);
|
||||||
expect(Math.abs(ttMinusUtSeconds(jd(1971, 12, 31)) - 42.2485)).toBeLessThan(0.01);
|
expect(Math.abs(ttMinusUtSeconds(jd(1971, 12, 31)) - 42.2485)).toBeLessThan(0.01);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user