Planet2.c
Bill Ames
billa at sci.UUCP
Tue Jan 14 03:05:31 AEST 1986
There is a minor bug in Fred Mendenhall's planet2.c program.
It treats the 24-hour time as though 1250 was 12.5 hours instead
of 12 + 50/60.
The following correction to the day calculation fixes it:
int hour,day;
...
hour = (int)(time/100);
minute = time - hour*100;
day = (double)dd + ((double)(hour+tz+minute/60.0))/24.0;
This makes example 3.a in Meeus's book (page 24) come out right, and
changes the ultimate locations of the planets by a small amount.
Bill Ames, Silicon Compilers Inc
More information about the Comp.sources.bugs
mailing list