Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!aeb From: aeb@mcvax.UUCP (Andries Brouwer) Newsgroups: net.sources.bugs Subject: Re: phase of the moon Message-ID: <673@mcvax.UUCP> Date: Thu, 23-May-85 09:13:39 EDT Article-I.D.: mcvax.673 Posted: Thu May 23 09:13:39 1985 Date-Received: Fri, 24-May-85 22:27:06 EDT References: <12100002@mirror.UUCP> Reply-To: aeb@mcvax.UUCP (Andries Brouwer) Organization: CWI, Amsterdam Lines: 21 In article <12100002@mirror.UUCP> rs@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;