Post Reply 
(12C Platinum) Day of Easter
09-15-2016, 08:42 PM (This post was last modified: 09-15-2016 08:54 PM by Dieter.)
Post: #13
RE: (12C Platinum) Day of Easter
(09-15-2016 01:15 PM)Dieter Wrote:  OK, this is without the carnival part. ;-)
But once again: there is an error in this algorithm.
The mentioned 29C program seems to work fine. So what about a 42s version?

Here is a 67/97 version with the (at least I think so) correctly working algorithm of the 29C program.
And especially for you, Gerson: it includes the date of carnival Sunday. ;-)

Code:
001  LBL A
002  INT
003  STO 1
004  STO 0
005  1
006  9
007  /
008  INT
009  1
010  9
011  *
012  STO-0
013  RCL 0
014  1
015  1
016  STO*0
017  /
018  STO 2
019  4
020  4
021  STO+0
022  1
023  RCL 1
024  %
025  INT
026  +
027  3
028  2
029  %
030  .
031  2
032  +
033  INT
034  STO+0
035  RDOWN
036  7
037  5
038  %
039  INT
040  STO 3
041  STO-0
042  RCL 0
043  3
044  0
045  /
046  INT
047  3
048  0
049  *
050  STO-0
051  RCL 2
052  RCL 0
053  x>y?
054  GTO 2
055  1
056  +
057  LBL 2
058  STO 4
059  CHS
060  RCL 1
061  .
062  8
063  /
064  INT
065  +
066  RCL 3
067  -
068  3
069  +
070  STO 0
071  7
072  /
073  INT
074  7
075  *
076  RCL 0
077  -
078  RCL 4
079  -
080  5
081  7
082  +
083  STO 4
084  3
085  STO 3
086  RCL 4
087  3
088  1
089  GSB 9
090  STO 2
091  R/S
092  CF 2
093  RCL 1
094  4
095  /
096  FRAC
097  x!=0?
098  GTO 7
099  SF 2
100  RCL 1
101  EEX
102  2
103  /
104  FRAC
105  x!=0?
106  GTO 7
107  LastX
108  4
109  /
110  FRAC
111  x!=0?
112  CF 2
113  LBL 7
114  2
115  STO 3
116  RCL 4
117  4
118  9
119  -
120  0
121  F2?
122  e^x
123  2
124  8
125  +
126  +
127  LastX
128  GSB 9
129  RCL 2
130  X<>Y
131  RTN
132  LBL 9
133  X<>Y
134  x<=y?
135  GTO 8
136  -
137  CHS
138  1
139  STO+3
140  RDOWN
141  LBL 8   ; for M.DY output change the following lines into...
142  RCL 3   ; EEX
143  EEX     ; 2
144  2       ; /
145  /       ; RCL 3
146  +       ; +
147  RCL 1
148  EEX
149  6
150  /
151  +
152  FIX
153  DSP 6
154  RTN

The 49 in line 117/118 is the number of days before Easter for the carnival date. Users in Central Europe may replace this with 48 to get the date of the following Monday. Output is in D.MY format. If you prefer, this can easily be changed to M.DY (see listing).

I have not done much testing with this program, so beware: it may contain any error you can imagine (and even those you can't ;-)). So try it and see what you get.

Example:

1954 [A] => 18.041954
   [R/S] => 28.021954


At the end both dates are stored in X and Y.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (12C Platinum) Day of Easter - Dieter - 09-14-2016, 10:36 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-15-2016, 01:15 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-15-2016 08:42 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-17-2016, 07:12 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-14-2016, 01:20 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-14-2016, 08:40 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-16-2016, 06:03 AM
RE: (12C Platinum) Day of Easter - Dieter - 09-15-2016, 05:46 PM
RE: (12C Platinum) Day of Easter - Dieter - 09-16-2016, 06:14 AM



User(s) browsing this thread: 1 Guest(s)