Post Reply 
(12C Platinum) Day of Easter
09-16-2016, 01:51 AM
Post: #15
RE: (12C Platinum) Day of Easter
(09-14-2016 08:40 PM)Dieter Wrote:  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

It does work on RPN-38 CX:

Easter

By Dieter

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

1950 R/S -> 4,09,1950 7 (M.DY) or 9,04,1950 7 (D.MY)

(Out of code box for easier copying and pasting into RPN-38 CX)

Regards,

Gerson.
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 - Gerson W. Barbosa - 09-16-2016 01:51 AM
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)