Post Reply 
(12C Platinum) Day of Easter
09-14-2016, 08:40 PM (This post was last modified: 09-14-2016 10:46 PM by Dieter.)
Post: #7
RE: (12C Platinum) Day of Easter
(09-14-2016 01:20 PM)Dieter Wrote:  May I draw your attention to this 95-step program for the 29C? I think it can be ported to other calculators. However, the 38C is a bit tricky since a modulo subroutine is called and the 38C offers no GSB.

Here is a 12C version of this algorithm. It does not require any subroutine calls and takes advantage of the DATE function which allows the code to fit in 94 lines. This way even the date format setting is observed (MM.DDYYYY or DD.MMYYYY). I did not try this on a 38C/E but it looks like this should run on these as well.

Code:
01  INTG
02  STO 1
03  STO 0
04  1
05  9
06  /
07  INTG
08  1
09  9
10  *
11  STO-0
12  RCL 0
13  1
14  1
15  STO*0
16  /
17  STO 2
18  4
19  4
20  STO+0
21  1
22  RCL 1
23  %
24  INTG
25  +
26  3
27  2
28  %
29  .
30  2
31  +
32  INTG
33  STO+0
34  R↓
35  7
36  5
37  %
38  INTG
39  STO 3
40  STO-0
41  RCL 0
42  3
43  0
44  /
45  INTG
46  3
47  0
48  *
49  STO-0
50  RCL 2
51  RCL 0
52  x<=y?
53  GTO 55
54  GTO 57
55  1
56  +
57  STO 4
58  CHS
59  RCL 1
60  .
61  8
62  /
63  INTG
64  +
65  RCL 3
66  -
67  3
68  +
69  STO 0
70  7
71  /
72  INTG
73  7
74  *
75  RCL 0
76  -
77  RCL 4
78  -
79  5
80  4
81  +
82  RCL 1
83  EEX
84  6
85  /
86  3
87  .
88  0
89  3
90  +
91  X<>Y
92  DATE
93  FIX 6
94  GTO 00

If you feel that using the date function is cheating: it can also be done in 99 steps without it. ;-)

For the record, here is a version for the 67/97 that uses only standard functions.

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  R↓
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  2
081  6
082  +
083  x>0?
084  GTO 3
085  6
086  9
087  -
088  LBL 3
089  1
090  %
091  4
092  +
093  RCL 1
094  EEX
095  6
096  /
097  +
098  FIX
099  DSP 6
100  RTN

For the latter version the Easter date is shown in MM.DDYYYY format.
For DD.MMYYYY simply change line 83ff:

Code:
...  ...
083  x>0?
084  GTO 3
085  3
086  0
087  .
088  9
089  9
090  +
091  LBL 3
092  .
093  0
094  4
095  +
096  RCL 1
097  EEX
098  6
099  /
100  +
101  FIX
102  DSP 6
103  RTN

Still fits on a single card track. ;-)

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)