Post Reply 
Wp34s date from DOY
11-04-2015, 04:33 PM (This post was last modified: 11-04-2015 04:50 PM by fhub.)
Post: #12
RE: Wp34s date from DOY
(11-04-2015 12:16 PM)ggauny@live.fr Wrote:  This is only for Fhub/Franz.
Hi GĂ©rard!

This is one of the problems I don't really like, because you just need to put a long and complicated formula into a calculator program - simply boring.
And there's not much to 'optimize' apart from the usual tricks (using register arithmetics, complex registers etc.)

Since your picture doesn't really say what the result should be, I've found the following website which seems to use the same algorithm (but more clearly), and I've made the program 'GED' (Gregorian Easter Date) from these formulas:
http://ghiorzi.org/easterda.htm
It has 74 steps (incl. the subroutine 'LBL 00' which calculates 'div' in X and 'mod' in Y) - maybe it could be shortened by a few steps with some more optimizations (certainly not more than 3 or 4, I guess), but I think it's not worth trying this.

Code:

001 LBL'GED'
002 LocR 008
003 STO .00
004 # 019
005 MOD
006 STO .01
007 RCL .00
008 # 100
009 XEQ 00
010 [cmplx]STO .02
011 # 004
012 XEQ 00
013 [cmplx]STO .04
014 # 008
015 RCL+ .02
016 # 025
017 IDIV
018 # 001
019 RCL+ .02
020 RCL- Y
021 # 003
022 IDIV
023 # 015
024 # 019
025 RCL[times] .01
026 +
027 RCL+ .02
028 RCL- .04
029 RCL- Y
030 # 030
031 MOD
032 STO .06
033 RCL .03
034 # 004
035 XEQ 00
036 RCL+ .05
037 RCL+ X
038 # 032
039 +
040 RCL- .06
041 RCL- Y
042 # 007
043 MOD
044 STO .07
045 RCL+ X
046 RCL+ .06
047 # 011
048 [times]
049 RCL+ .01
050 4
051 5
052 1
053 IDIV
054 # 007
055 [times]
056 # 114
057 RCL+ .06
058 RCL+ .07
059 RCL- Y
060 # 031
061 XEQ 00
062 INC Y
063 RCL .00
064 SDR 004
065 +
066 SDR 002
067 +
068 RTN
069 LBL 00
070 [cmplx]ENTER
071 MOD
072 [<->] YZXT
073 IDIV
074 END

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 05:37 PM
RE: Wp34s date from DOY - fhub - 11-03-2015, 06:15 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 07:40 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 07:47 PM
RE: Wp34s date from DOY - Dieter - 11-03-2015, 08:05 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:21 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:22 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:29 PM
RE: Wp34s date from DOY - Dieter - 11-03-2015, 08:33 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:51 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-04-2015, 12:16 PM
RE: Wp34s date from DOY - fhub - 11-04-2015 04:33 PM
RE: Wp34s date from DOY - Dieter - 11-05-2015, 01:30 PM
RE: Wp34s date from DOY - fhub - 11-05-2015, 02:55 PM



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