DSPRelated.com
Forums

OT: Calculating date of Easter

Started by Unknown March 21, 2008
Hello All,

As a bunch of DSPers we like to calculate things. And one that is
somewhat challenging is the date of Easter. It has an astronomical
origin - specifically it is the 1st Sunday on or after the 1st full
moon after the 1st day of Spring (Northern Hemisphere). Of course an
accurate calculation involving the Moon can be quite extensive, For
example E. W. Brown's lifework on the moon contains unbelievably long
formulae. For example to find the moon's longitude he gives an
equation with 1650 trigonometric terms! But the clergy took some
shortcuts such as saying the 1st day of Spring is always Mar 21, even
though it usually occurs on Mar 20 and may occur on Mar 19..

During the late 1800s, a neat method involving only integer math was
devised to give the date of Easter. Here is the code snippet I put
together using this method. Just thought you all might be interested.
It just goes to show there were some quite clever people back then.

Clay




// Easter Program written by Clay S. Turner

// Calculates date of Easter using ecclesiastical full moon.
// A modern reference for this method is Jean Meeus' "Astronomical
Algorithms",1991
// Meeus writes: "According to "Journal of the Bristish Astronomical
Association",Vol. 88, page 91 (Dec. 1977)
// the method was apparently devised in 1876 and appeared in Butcher's
"Ecclesiastical Calendar"
//
// Good for all years from 1583 onwards

void Easter(int year)
{
int a,b,c,d,e,f,g,h,i,k,l,m,month,day;

a=year%19;
c=year%100;
b=year/100;
d=b/4;
e=b%4;
f=(b+8)/25;
g=(b-f+1)/3;
h=(19*a+b-d-g+15)%30;
i=c/4;
k=c%4;
l=(32+2*e+2*i-h-k)%7;
m=(a+11*h+22*l)/451;
day=h+l-7*m+114;
month=day/31;
day=1+day%31;

printf("%s %.2d %.4d\n",3==month?"March":"April",day,year);
}



clay@claysturner.com wrote:

> As a bunch of DSPers we like to calculate things. And one that is > somewhat challenging is the date of Easter. It has an astronomical > origin - specifically it is the 1st Sunday on or after the 1st full > moon after the 1st day of Spring (Northern Hemisphere).
In which time zone? It seems that it could be different days in different time zones, though I don't know that it has happened.
> Of course an > accurate calculation involving the Moon can be quite extensive, For > example E. W. Brown's lifework on the moon contains unbelievably long > formulae. For example to find the moon's longitude he gives an > equation with 1650 trigonometric terms! But the clergy took some > shortcuts such as saying the 1st day of Spring is always Mar 21, even > though it usually occurs on Mar 20 and may occur on Mar 19..
Hmm. The 'first day of spring' is the day that contains the equinox, while a full moon could occur on the same day, before or after the equinox. It seems, though, that as written it must be a full moon on a different day. The first few programs in "Numerical Recipes" are moon related. I don't remember if they are fixed or floating point, though. -- glen
On Mar 21, 1:20&#4294967295;pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> c...@claysturner.com wrote: > > As a bunch of DSPers we like to calculate things. And one that is > > somewhat challenging is the date of Easter. It has an astronomical > > origin - specifically it is the 1st Sunday on or after the 1st full > > moon after the 1st day of Spring (Northern Hemisphere). > > In which time zone? &#4294967295;It seems that it could be different days > in different time zones, though I don't know that it has > happened. > > > Of course an > > accurate calculation involving the Moon can be quite extensive, For > > example E. W. Brown's lifework on the moon contains unbelievably long > > formulae. For example to find the moon's longitude he gives an > > equation with 1650 trigonometric terms! But the clergy took some > > shortcuts such as saying the 1st day of Spring is always Mar 21, even > > though it usually occurs on Mar 20 and may occur on Mar 19.. > > Hmm. &#4294967295;The 'first day of spring' is the day that contains the equinox, > while a full moon could occur on the same day, before or after > the equinox. &#4294967295;It seems, though, that as written it must be > a full moon on a different day. > > The first few programs in "Numerical Recipes" are moon related. > I don't remember if they are fixed or floating point, though. > > -- glen
Hello Glen, NR has a program for the occurence of the full moon which does use floating point. I think their program only gets you to the nearest day - which would present a problem for full moons near midnight as to which day one says it occurs on. Precise calcs get you within minutes or seconds. Seems a bit extreme until you want to know details about an eclipse. Of course the clergy sidestepped these issues. There are quite a few times where the astronomical rule and the ecclesiastical rules result in different dates for Easter. I believe the Greek calendar uses even different rules so their Easters can be on different dates from say the Catholic Easters. A part of the Easter calculation stems from the Metonic cycle where 235 lunations is approximately 19 years. Of course the time from full moon to full moon varies by several days. This results from both the Earth and Moon each having elliptical orbits. More accurate calculations usually use Julian Day or Julian Day Ephemeris time where the day begins at noon GMT. Then of course you can correct to your time zone. Many calendars I've seen just use lunar tables made for GMT and don't worry about correcting a time zone. JD and JDE are very close to each other. The differences result from using an astronomical time base for one and a uniform time base for the other. Since the Earth's rotation is slowing down and since the air and water masses are moving about, the Earth's rotation after detrending for the slowdown is eratic. This is something that cannot be predicted but is measured and used to correct the world's clocks. Clay
clay@claysturner.com wrote:
> Hello All, > > As a bunch of DSPers we like to calculate things. And one that is > somewhat challenging is the date of Easter. It has an astronomical > origin - specifically it is the 1st Sunday on or after the 1st full > moon after the 1st day of Spring (Northern Hemisphere). Of course an > accurate calculation involving the Moon can be quite extensive, For > example E. W. Brown's lifework on the moon contains unbelievably long > formulae. For example to find the moon's longitude he gives an > equation with 1650 trigonometric terms! But the clergy took some > shortcuts such as saying the 1st day of Spring is always Mar 21, even > though it usually occurs on Mar 20 and may occur on Mar 19.. > > During the late 1800s, a neat method involving only integer math was > devised to give the date of Easter. Here is the code snippet I put > together using this method. Just thought you all might be interested. > It just goes to show there were some quite clever people back then. > > Clay >
Western-tradition Easter. Doesn't the Eastern Orthodox church have Easter on a different day? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
On Mar 21, 5:30&#4294967295;pm, Tim Wescott <t...@seemywebsite.com> wrote:
> c...@claysturner.com wrote: > > Hello All, > > > As a bunch of DSPers we like to calculate things. And one that is > > somewhat challenging is the date of Easter. It has an astronomical > > origin - specifically it is the 1st Sunday on or after the 1st full > > moon after the 1st day of Spring (Northern Hemisphere). Of course an > > accurate calculation involving the Moon can be quite extensive, For > > example E. W. Brown's lifework on the moon contains unbelievably long > > formulae. For example to find the moon's longitude he gives an > > equation with 1650 trigonometric terms! But the clergy took some > > shortcuts such as saying the 1st day of Spring is always Mar 21, even > > though it usually occurs on Mar 20 and may occur on Mar 19.. > > > During the late 1800s, a neat method involving only integer math was > > devised to give the date of Easter. Here is the code snippet I put > > together using this method. Just thought you all might be interested. > > It just goes to show there were some quite clever people back then. > > > Clay > > Western-tradition Easter. &#4294967295;Doesn't the Eastern Orthodox church have > Easter on a different day? > > -- > > Tim Wescott > Wescott Design Serviceshttp://www.wescottdesign.com > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" gives you just what it says. > See details athttp://www.wescottdesign.com/actfes/actfes.html- Hide quoted text - > > - Show quoted text -
Tim, They quite likely do. There are many different historical calendars that are still used by various religions. Clay
clay@claysturner.com wrote:
> Hello All, > As a bunch of DSPers we like to calculate things.
I'll agree so far. > And one that is somewhat challenging is the date of Easter. Unsupported. > It has an astronomical origin. _That_ I'll dispute. You have neglected to define "Easter". "Easter" as an *ANNUAL* celebration arose in 3rd century C.E. ( I would say Anno Domini, but I'll not object to *political* correctness in THIS case ). The "first easter" was the resurrection of Christ on "the _first_ day of the week following Passover". Please note two things: 1. "Passover" can occur on any day of the week. 2. early church celebrated the resurrection on first day of the week.
> - specifically it is the 1st Sunday on or after the 1st full > moon after the 1st day of Spring (Northern Hemisphere).
Please be more careful ;) Are you referring to Eastern or Western Rite? > Of course an
> accurate calculation involving the Moon can be quite extensive, For > example E. W. Brown's lifework on the moon contains unbelievably long > formulae. For example to find the moon's longitude he gives an > equation with 1650 trigonometric terms! But the clergy took some > shortcuts such as saying the 1st day of Spring is always Mar 21, even > though it usually occurs on Mar 20 and may occur on Mar 19.. > > During the late 1800s, a neat method involving only integer math was > devised to give the date of Easter. Here is the code snippet I put > together using this method. Just thought you all might be interested. > It just goes to show there were some quite clever people back then. > > Clay > > > > > // Easter Program written by Clay S. Turner > > // Calculates date of Easter using ecclesiastical full moon. > // A modern reference for this method is Jean Meeus' "Astronomical > Algorithms",1991 > // Meeus writes: "According to "Journal of the Bristish Astronomical > Association",Vol. 88, page 91 (Dec. 1977) > // the method was apparently devised in 1876 and appeared in Butcher's > "Ecclesiastical Calendar" > // > // Good for all years from 1583 onwards > > void Easter(int year) > { > int a,b,c,d,e,f,g,h,i,k,l,m,month,day; > > a=year%19; > c=year%100; > b=year/100; > d=b/4; > e=b%4; > f=(b+8)/25; > g=(b-f+1)/3; > h=(19*a+b-d-g+15)%30; > i=c/4; > k=c%4; > l=(32+2*e+2*i-h-k)%7; > m=(a+11*h+22*l)/451; > day=h+l-7*m+114; > month=day/31; > day=1+day%31; > > printf("%s %.2d %.4d\n",3==month?"March":"April",day,year); > } > > >
clay@claysturner.com wrote:

> On Mar 21, 5:30 pm, Tim Wescott <t...@seemywebsite.com> wrote: > >>c...@claysturner.com wrote: >> >>>Hello All, >> >>>As a bunch of DSPers we like to calculate things. And one that is >>>somewhat challenging is the date of Easter. It has an astronomical >>>origin - specifically it is the 1st Sunday on or after the 1st full >>>moon after the 1st day of Spring (Northern Hemisphere). Of course an >>>accurate calculation involving the Moon can be quite extensive, For >>>example E. W. Brown's lifework on the moon contains unbelievably long >>>formulae. For example to find the moon's longitude he gives an >>>equation with 1650 trigonometric terms! But the clergy took some >>>shortcuts such as saying the 1st day of Spring is always Mar 21, even >>>though it usually occurs on Mar 20 and may occur on Mar 19.. >> >>>During the late 1800s, a neat method involving only integer math was >>>devised to give the date of Easter. Here is the code snippet I put >>>together using this method. Just thought you all might be interested. >>>It just goes to show there were some quite clever people back then. >> >>>Clay >> >>Western-tradition Easter. Doesn't the Eastern Orthodox church have >>Easter on a different day? >> >>-- >> >>Tim Wescott >>Wescott Design Serviceshttp://www.wescottdesign.com >> >>Do you need to implement control loops in software? >>"Applied Control Theory for Embedded Systems" gives you just what it says. >>See details athttp://www.wescottdesign.com/actfes/actfes.html- Hide quoted text - >> >>- Show quoted text - > > > Tim, > > They quite likely do. There are many different historical calendars > that are still used by various religions. > > Clay >
Gregorian vs Julian
On Mar 21, 6:15&#4294967295;pm, Richard Owlett <rowl...@atlascomm.net> wrote:
> c...@claysturner.com wrote: > > On Mar 21, 5:30 pm, Tim Wescott <t...@seemywebsite.com> wrote: > > >>c...@claysturner.com wrote: > > >>>Hello All, > > >>>As a bunch of DSPers we like to calculate things. And one that is > >>>somewhat challenging is the date of Easter. It has an astronomical > >>>origin - specifically it is the 1st Sunday on or after the 1st full > >>>moon after the 1st day of Spring (Northern Hemisphere). Of course an > >>>accurate calculation involving the Moon can be quite extensive, For > >>>example E. W. Brown's lifework on the moon contains unbelievably long > >>>formulae. For example to find the moon's longitude he gives an > >>>equation with 1650 trigonometric terms! But the clergy took some > >>>shortcuts such as saying the 1st day of Spring is always Mar 21, even > >>>though it usually occurs on Mar 20 and may occur on Mar 19.. > > >>>During the late 1800s, a neat method involving only integer math was > >>>devised to give the date of Easter. Here is the code snippet I put > >>>together using this method. Just thought you all might be interested. > >>>It just goes to show there were some quite clever people back then. > > >>>Clay > > >>Western-tradition Easter. &#4294967295;Doesn't the Eastern Orthodox church have > >>Easter on a different day? > > >>-- > > >>Tim Wescott > >>Wescott Design Serviceshttp://www.wescottdesign.com > > >>Do you need to implement control loops in software? > >>"Applied Control Theory for Embedded Systems" gives you just what it says. > >>See details athttp://www.wescottdesign.com/actfes/actfes.html-Hide quoted text - > > >>- Show quoted text - > > > Tim, > > > They quite likely do. There are many different historical calendars > > that are still used by various religions. > > > Clay > > Gregorian vs Julian- Hide quoted text -
There are more calendars than that. The Jewest calendar is also luni- solar where the months have 29 or 30 days and the year has 12 or 13 months. The Jewish Easter always falls on 15 Nisan. The Jewest common year may have 353,354, or 355 days. The leap year will have 383,384, or 385 days. The Islamic calendar is purely lunar with 12 lunar months making up a year. This is without regard to the tropical year. 12 lunar months will end up having 354 or 355 days.
On Mar 21, 6:12&#4294967295;pm, Richard Owlett <rowl...@atlascomm.net> wrote:
> c...@claysturner.com wrote: > > Hello All, > > As a bunch of DSPers we like to calculate things. > > I'll agree so far. > > &#4294967295;> And one that is somewhat challenging is the date of Easter. > > Unsupported.
Unsupported? How many people do you know that can calculate (in their head) the date of Easter when just given the year? This alone makes it challenging! And if you look at the equations in the code, I think you will see it is not simple.
> > &#4294967295;> It has an astronomical origin. > > _That_ I'll dispute. > You have neglected to define "Easter".
What I should have said is the rule for determining the date of Easter is astronomically based. I.e., the vernal equinox and the full moon.
> > "Easter" as an *ANNUAL* celebration arose in 3rd century C.E. > ( I would say Anno Domini, but I'll not object to *political* > correctness in THIS case ). > > The "first easter" was the resurrection of Christ on "the _first_ day of > the week following Passover". > > Please note two things: > 1. "Passover" can occur on any day of the week. > 2. early church celebrated the resurrection on first day of the week.
Yes Passover (as observed by some Jewesh groups) occurs on the 1st full Moon after the Vernal equinox, so the day of the week can be anything. There is no concordance between the day of the week and lunar phases.
> > > - specifically it is the 1st Sunday on or after the 1st full > > moon after the 1st day of Spring (Northern Hemisphere). > > Please be more careful ;) > Are you referring to Eastern or Western Rite?
I don't know about which Rites but the code I gave yields this Sunday as Easter. As I have said in multple responses there is more than one Easter as different religous groups have different ways of defining it. But when you go into a common store (not one that caters to a specific religious group) and buy a calendar, the Easter in it is the one I'm talking about.
> > &#4294967295;> Of course an > > > > > accurate calculation involving the Moon can be quite extensive, For > > example E. W. Brown's lifework on the moon contains unbelievably long > > formulae. For example to find the moon's longitude he gives an > > equation with 1650 trigonometric terms! But the clergy took some > > shortcuts such as saying the 1st day of Spring is always Mar 21, even > > though it usually occurs on Mar 20 and may occur on Mar 19.. > > > During the late 1800s, a neat method involving only integer math was > > devised to give the date of Easter. Here is the code snippet I put > > together using this method. Just thought you all might be interested. > > It just goes to show there were some quite clever people back then. > > > Clay > > > // Easter Program written by Clay S. Turner > > > // Calculates date of Easter using ecclesiastical full moon. > > // A modern reference for this method is Jean Meeus' "Astronomical > > Algorithms",1991 > > // Meeus writes: "According to "Journal of the Bristish Astronomical > > Association",Vol. 88, page 91 (Dec. 1977) > > // the method was apparently devised in 1876 and appeared in Butcher's > > "Ecclesiastical Calendar" > > // > > // Good for all years from 1583 onwards > > > void Easter(int year) > > { > > int a,b,c,d,e,f,g,h,i,k,l,m,month,day; > > > a=year%19; > > c=year%100; > > b=year/100; > > d=b/4; > > e=b%4; > > f=(b+8)/25; > > g=(b-f+1)/3; > > h=(19*a+b-d-g+15)%30; > > i=c/4; > > k=c%4; > > l=(32+2*e+2*i-h-k)%7; > > m=(a+11*h+22*l)/451; > > day=h+l-7*m+114; > > month=day/31; > > day=1+day%31; > > > printf("%s %.2d %.4d\n",3==month?"March":"April",day,year); > > }- Hide quoted text - > > - Show quoted text -
clay@claysturner.com wrote:
> Hello All, > > As a bunch of DSPers we like to calculate things. And one that is > somewhat challenging is the date of Easter. It has an astronomical > origin - specifically it is the 1st Sunday on or after the 1st full > moon after the 1st day of Spring (Northern Hemisphere). Of course an > accurate calculation involving the Moon can be quite extensive, For > example E. W. Brown's lifework on the moon contains unbelievably long > formulae. For example to find the moon's longitude he gives an > equation with 1650 trigonometric terms! But the clergy took some > shortcuts such as saying the 1st day of Spring is always Mar 21, even > though it usually occurs on Mar 20 and may occur on Mar 19.. > > During the late 1800s, a neat method involving only integer math was > devised to give the date of Easter. Here is the code snippet I put > together using this method. Just thought you all might be interested. > It just goes to show there were some quite clever people back then. > > Clay
There's usually a simpler way. The last Supper was a Passover seder, a special one that happened to coincide with the Sabbath. Easter is usually the first Sunday after Passover (which means that if Passover is Sunday, Easter is a week later. They are not permitted to coincide.) This year, the intercalation of a leap month in the Hebrew (actually, Babylonian) calendar moves passover 28 days later, to April 19. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;