You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In eraTaiutc, there is an iteration block that calls back to eraUtctai to get the leap seconds deltas. In the iteration, the deltas for both arguments are added to the 2nd argument. Should the first delta be applied to the first argument?
/* Iterate (though in most cases just once is enough). */
for ( i = 0; i < 3; i++ ) {
/* Guessed UTC to TAI. */
j = eraUtctai(u1, u2, &g1, &g2);
if ( j < 0 ) return j;
/* Adjust guessed UTC. */
u2 += a1 - g1; --> should this be u1 += a1 - g1
u2 += a2 - g2;
}
In practice, I think the first delta is always zero so it doesn't affect the actual values.
The text was updated successfully, but these errors were encountered:
Thanks for the question! As you noticed, in general g1 and g2 are both small. Since u1 is normally a much larger number, than u1 adding to u1 thus risks rounding errors.
In eraTaiutc, there is an iteration block that calls back to eraUtctai to get the leap seconds deltas. In the iteration, the deltas for both arguments are added to the 2nd argument. Should the first delta be applied to the first argument?
In practice, I think the first delta is always zero so it doesn't affect the actual values.
The text was updated successfully, but these errors were encountered: