Post Reply 
(12C Platinum) Day of Easter
09-15-2016, 01:15 AM (This post was last modified: 09-15-2016 01:17 AM by Gerson W. Barbosa.)
Post: #9
RE: (12C Platinum) Day of Easter
(09-14-2016 10:36 PM)Dieter Wrote:  
(09-13-2016 01:26 AM)Gerson W. Barbosa Wrote:  On my HP-42S program I get

Carnival: Feb-19-1950
  Easter: Apr-09-1950

You can also do this with the 12C program I posted.
For carnival, add –49 DATE at the end.
Or –48 DATE over here (Rosenmontag).
It still fits in 99 lines. ;-)

Very nice! I will try it when I find my 3-cell 12C.

Unfortunately my HP-42S program gets Easter of 1954 wrong (Apr-25 instead of Apr-18). Hopefully not my fault as this agrees with the original Basic program:

Code:

 1  PRINT "DATA DA PASCOA E CARNAVAL ENTRE 1900 E 2099"
 2  PRINT "FORMULAS DE GAUSS. PROGRAMADO POR R. BOCZKO"
 5  REM  CALCULO DA DATA DA PASCOA (GAUSS)
 10  PRINT : INPUT "PASCOA DE QUE ANO? (0 PARA INTERROMPER) ";AN
 15  IF AN < 1583 GOTO 3010
 20 NU = ANO:DE = 19
 30  GOSUB 1000
 40 A = R
 50 DE = 4: GOSUB 1000
 60 B = R
 70 DE = 7: GOSUB 1000
 80 C = R
 90 NU = 19 * A + 24:DE = 30
 100  GOSUB 1000
 110 D = R
 120 NU = 2 * B + 4 * C + 6 * D + 5
 130 DE = 7: GOSUB 1000
 140 E = R
 150 P = 22 + D + E
 155  PRINT : PRINT AN
 160  IF P <  = 31 THEN  PRINT "DATA DA PASCOA=";P;" DE MARCO":ME = 3: GOTO 2000
 170  IF (D + E - 9) <  = 25 THEN  PRINT "DATA DA PASCOA=";P - 31;" DE ABRIL":ME = 4:P = P - 31: GOTO 2000
 1000 R = NU - ( INT (NU / DE)) * DE
 1010  RETURN 
 2000 B = 0
 2002  IF (AN -  INT (AN / 4) * 4) <  > 0 GOTO 2010
 2004 B = 1
 2010  IF ME = 4 THEN  GOTO 2060
 2030 C = 28 + B + P - 49
 2040  PRINT "CARNAVAL = ";C;" DE FEVEREIRO"
 2050  GOTO 2210
 2060 C = 28 + B + 31 + P - 49
 2070  IF C > 28 + B GOTO 2100
 2080  PRINT "CARNAVAL = ";C;" DE FEVEREIRO"
 2090  GOTO 2210
 2100 C = C - 28 - B
 2200  PRINT "CARNAVAL = ";C;" DE MARCO"
 2210  GOTO 10
 3010  END

This program was published eons ago in a poster on calendars that came with Superinteressante magazine (in Portuguese).

I did the conversion from Basic to RPN so blindly that even the modulus subroutine made into the program instead of the built-in MOD function. Anyway, I was using the HP-42S then only as a replacement after I had sold my HP-28S and before I got my first HP-48 GX.

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