Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: the guy who said cm6000 is stronger than 8000 is right!

Author: stuart taylor

Date: 11:44:32 05/23/01

Go up one level in this thread



>E:\nr\fixed>type badluk.c
>#include "nr.h"
>#define ZON -5.0
>#define IYBEG 2000
>#define IYEND 2100
>
>int main(void)
>{                               /* Program BADLUK */
>  int ic, icon, idwk, im, iyyy, n;
>  double timzon = ZON / 24.0, frac;
>  long jd, jday;
>
>  printf ("\nFull moons on Friday the 13th from %5d to %5d\n", IYBEG, IYEND);
>  for (iyyy = IYBEG; iyyy <= IYEND; iyyy++)
>    {
>      for (im = 1; im <= 12; im++)
>        {
>          jday = julday (im, 13, iyyy);
>          idwk = (int) ((jday + 1) % 7);
>          if (idwk == 5)
>            {
>              n = (int) (12.37 * (iyyy - 1900 + (im - 0.5) / 12.0));
>              icon = 0;
>              for (;;)
>                {
>                  flmoon (n, 2, &jd, &frac);
>                  frac = 24.0 * (frac + timzon);
>                  if (frac < 0.0)
>                    {
>                      --jd;
>                      frac += 24.0;
>                    }
>                  if (frac > 12.0)
>                    {
>                      ++jd;
>                      frac -= 12.0;
>                    }
>                  else
>                    frac += 12.0;
>                  if (jd == jday)
>                    {
>                      printf ("\n%2d/13/%4d\n", im, iyyy);
>                      printf ("%s %5.1f %s\n", "Full moon", frac,
>                              " hrs after midnight (EST)");
>                      break;
>                    }
>                  else
>                    {
>                      ic = (jday >= jd ? 1 : -1);
>                      if (ic == (-icon))
>                        break;
>                      icon = ic;
>                      n += ic;
>                    }
>                }
>            }
>        }
>    }
>  return 0;
>}
>
>E:\nr\fixed>badluk
>
>Full moons on Friday the 13th from  2000 to  2100
>
>10/13/2000
>Full moon   4.0  hrs after midnight (EST)
>
> 9/13/2019
>Full moon  23.6  hrs after midnight (EST)
>
> 8/13/2049
>Full moon   3.8  hrs after midnight (EST)
>
> 2/13/2082
>Full moon   1.9  hrs after midnight (EST)
>
>10/13/2084
>Full moon  15.2  hrs after midnight (EST)
>
> 6/13/2098
>Full moon  15.6  hrs after midnight (EST)
>
>
I DON'T FOLLOW!
S.Taylor



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.