[net.puzzle] Computer bugs in the year 3200

bill@ur-cvsvax.UUCP (Bill Vaughn) (02/15/85)

> In article <7927@brl-tgr.ARPA> ron@brl-tgr.ARPA (Ron Natalie <ron>) writes:
> >> For those of you fixing things in your software:
> >> 
> >> The year 2000 *is* a leap year, despite what many algorithms tell you.
> >> The year 2400 is *not* a leap year.
> >> 
> >> With minimal effort, you can make things work until 2399.  You may be
> >> subject to complaints after that.
> >> 
> >Now you've really got me confused.  Why is 2400 not a leap year?
> 
> (msd = mean solar day)
> 1 year = 365.2422 msd = 365 + 1/4 - 1/100 + 1/400 + error
> That's why we have:
>     leapyear 1 out of 4
>     non leap year 1 out of 100
>     leapyear 1 out of 400             (So 2400 is a leap year.)
> Read any basic astronomy book.
> -- 

Hmmm.  Let's take this two more steps. Since our error over the long run
will be +0.0003 msd, we can reduce this by taking a leap year back every
3200 years making the error now -0.0000125 msd. But this can be corrected by
replacing one of those leap years we just took back every 80,000 years
and we're right on the money, assuming 365.2422 msd/year is exact and
that it's constant over this period of time. I'm sure neither of these
assumptions are correct ;-).

So, for the time being, I claim that 3200 should *not* be a leap year, (nor
should any year divisible by 3200, except if it's also divisible by 80,000).

OK you hackers, I want those algorithms updated tomorrow. :-)

		Bill Vaughn
		UNIV. OF ROCHESTER
		Center for Visual Science
		{allegra,seismo,decvax}!rochester!ur-cvsvax!bill

		 Guru:	What's the matter?
	Novice hacker:	When I do this, it hurts. (shows guru his core dump)
		 Guru:	DON'T DO THAT!!

darrelj@sdcrdcf.UUCP (Darrel VanBuer) (02/21/85)

A brief history of Western calendars:  as man became more civilized (and
planned more details of life, and more carefully observered details of the
world--a hunter gatherer really doesn't need a calendar, you just follow the
seasons in what you seek out), he came to need to know as early as possible
when key annual events occur (e.g. spring planting).  One of the earliest
techniques was instrumented observation (like Stonehenge), but this requires
some considerable investment in equipment and "operators".  The early Romans
used a 365 day year with edicted adjustments when observation showed to much
error.  By the time of Julius Caesar, the measurements and understanding of
the problem led to the imposition of the Julian calendar throughout the
Roman empire in which every fourth year is a leap year (leaving an error of
about 1 day in 125 years).  By requiring a calendar which was the best
science had to offer, you contribute to a smooth-running empire with
everybody celebrating important religious and social days at the same time
without worry that a provincial astronomer will get out of phase due to
different interpretations of the observations (this was a real problem with
Jewish holy days a few thousand years ago--first they had separate
determination resulting in occasional missed syncronization, then signal
fires from a central authority in Jerusalem which fell victim to malicious
interference, and finally a computational system).
Because of the residual error, by the late 16th century, Pope Gregory
mandated the Gregorian calendar which combined a one-time correction of 10
days (in 1582) and the current system which omits leap years in century
years not a multiple of 400.  Because of religious factionalism, many areas
did not change until much later (e.g. England delayed until 1752 and the
Eastern Catholic churches the 20th century).  There is still a residual
error of about one day in 3200 years for which the necessary political
solution has yet to be taken up (but based on the threshold for past action,
we have about 30,000 years before it will happen :-).

The official length of the year 1900 was 31,556,925.9747 seconds.  The error
in the actual length and change due to slowing of the Earth's rotation is
such that a leap second has to be inserted every year or two by standard
timekeepers such as NBS.  I don't have a good handle on the error due to
slowing, but I doubt we'll but up to a full day for 20,000 years yet (it's a
difficult measurement because it's near the limits of current measurement
technology [to clarify--that's a cumulative full day off, not a year a whole day
shorter].  It may also never come due to the leap-second scheme in use by
standards organizations (at least till everybody has an atomic clock and
notice what the standards people are doing :-).

Note that 2000 IS IS IS a leap year--ask Pope Gregory. (there has been some
misinformation appearing on this point)

-- 
Darrel J. Van Buer, PhD
System Development Corp.
2500 Colorado Ave
Santa Monica, CA 90406
(213)820-4111 x5449
...{allegra,burdvax,cbosgd,hplabs,ihnp4,orstcs,sdcsvax,ucla-cs,akgua}
                                                            !sdcrdcf!darrelj
VANBUER@USC-ECL.ARPA

darrelj@sdcrdcf.UUCP (Darrel VanBuer) (02/21/85)

A further clarification: The leap seconds deal with the difference between
the mean solar day and 86400 standard seconds, and have no (direct) effect
on leap days except as errors in the day also change the number of days in a
year (which is further complicated by gradual changes in the Earth's orbit).

(By the way, the error in the Gregorian calendar is just over 26 seconds per
year)

-- 
Darrel J. Van Buer, PhD
System Development Corp.
2500 Colorado Ave
Santa Monica, CA 90406
(213)820-4111 x5449
...{allegra,burdvax,cbosgd,hplabs,ihnp4,orstcs,sdcsvax,ucla-cs,akgua}
                                                            !sdcrdcf!darrelj
VANBUER@USC-ECL.ARPA