phase of the moon
Andries Brouwer
aeb at mcvax.UUCP
Thu May 23 23:13:39 AEST 1985
In article <12100002 at mirror.UUCP> rs at mirror.UUCP writes:
>
>The recent posting by Robert Bond with the sunrise/sunset
>programs led me to dig out this old chestnut that had been
>floating around MIT for a while. It /seems/ correct to
>me, but I ain't no "loup-garou" :-)
My werewolf instinct tells me that after
long Length, Delta, Phase;
double Fraction;
Length = ...;
Delta = ...;
Phase = Delta % Length;
Fraction = Phase / Length;
one will have
Fraction == 0.0
which surely was not what the author intended.
It also wonders what happened with leap years in the line
offset = ((year * 365L + julianday) * 24L + hour) * 60L + minute;
More information about the Comp.sources.bugs
mailing list