Wp34s date from DOY
|
11-03-2015, 05:37 PM
Post: #1
|
|||
|
|||
Wp34s date from DOY
Hi,
We all know how calculate a "Day of year" say also "YearDay". A beautifull little routine stays in the WP34s Library for this. But reverse is it possible, say I know the DOY and, of course, the year of this day of year ? Yes it is possible with that little routine adapted from A POUPLIER in Jean MEEUS. Code:
Enter first YEAR and second DOY ! So, 1908 297 ----> 23,101908 my Father born 1914 169 ----> 18,061914 my Mother born 1907 90 ----> 31,031907 1908 91 ----> 31,031908 Gérard. : Gérard. |
|||
11-03-2015, 06:15 PM
(This post was last modified: 11-03-2015 06:41 PM by fhub.)
Post: #2
|
|||
|
|||
RE: Wp34s date from DOY
(11-03-2015 05:37 PM)ggauny@live.fr Wrote: Yes it is possible with that little routine adapted from A POUPLIER in Jean MEEUS.Why not use the powerful features of the WP34s and make this program MUCH shorter? Code:
Franz |
|||
11-03-2015, 07:40 PM
Post: #3
|
|||
|
|||
RE: Wp34s date from DOY
Hi Franz,
I see that I have a lot of thinks in programing !!!! Really super, I've put this into my special folder where I copy all optimisations. I've not think of this way. Really nice short and elegant routine ! I wish you good night, I wish me programing like this. First I learn, after I do as you and Dieter..... (May be ?) Thank's you. Gérard. Gérard. |
|||
11-03-2015, 07:47 PM
Post: #4
|
|||
|
|||
RE: Wp34s date from DOY
Really breathtaking !
Gérard. Gérard. |
|||
11-03-2015, 08:05 PM
(This post was last modified: 11-03-2015 08:13 PM by Dieter.)
Post: #5
|
|||
|
|||
RE: Wp34s date from DOY
(11-03-2015 07:47 PM)ggauny@live.fr Wrote: Really breathtaking ! It's the rich function set of the 34s that makes such programs possible – short, elegant and straightforward. For instance, if you know there is a DAYS+ command all you have to do is add the day number (minus one) to 1 Jan of that year. That's what Franz' program does in a few steps. It also shows that such a program actually is not really required – a manual calculation requires just a few keystrokes. I suggest you take a trip through the IOP section of the 34s manual (index of operations) where you will find all those nice functions. Here and there I am still discovering details I did not know of before. ;-) Dieter |
|||
11-03-2015, 08:21 PM
Post: #6
|
|||
|
|||
RE: Wp34s date from DOY
Hi Franz,
The genials things are always simple as said Einstein ! But how you reason to view like this, it is easy to copy but it is harder and better to understand as Masters reason, as masters dread the problems. In my youngth (23 years old) I was Champion of Lorraine in chess (First table), with reading, learnig, training yes but also because I was abble to see and reason better then my adversaries, Can't explain but we can learn this with goods professors. I think that you, Dieter and so others see better than the majority ! In other routine you cut it off the half, 49 steps to 29 steps !!! Thank's again. In french, in same situations, we say(a bit slang incorrect), "I'm on the ass !" ! Pardon.... Gérard. huh: Gérard. |
|||
11-03-2015, 08:22 PM
Post: #7
|
|||
|
|||
RE: Wp34s date from DOY
Gérard. |
|||
11-03-2015, 08:29 PM
Post: #8
|
|||
|
|||
RE: Wp34s date from DOY
Hi Dieter,
Y're right, as many I play with machine without deeply lear the manuals ! And I have the Walter Bonin manual. I'm going to stop programing like this and follow your advertising ! First learn, after programing ! Thank's Gérard. Gérard. |
|||
11-03-2015, 08:33 PM
Post: #9
|
|||
|
|||
RE: Wp34s date from DOY | |||
11-03-2015, 08:51 PM
Post: #10
|
|||
|
|||
RE: Wp34s date from DOY
It is my wish, Dieter.
It is may be nut but I look at yours routines of you and Franz and so many other as a chidren in front of sugar shop !!! Yes I think that in few time, I will programing as you all..... My wife call me to go sleep, I go.... (with time, she is like my Mother, worth ! yes, yes) Cheezr Gérard. Gérard. |
|||
11-04-2015, 12:16 PM
Post: #11
|
|||
|
|||
RE: Wp34s date from DOY
This is only for Fhub/Franz.
Gérard. |
|||
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:
Franz |
|||
11-05-2015, 01:30 PM
Post: #13
|
|||
|
|||
RE: Wp34s date from DOY
(11-04-2015 04:33 PM)fhub Wrote: 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. Easter programs for programmable calculators have a long tradition – exactly because they handle these long and complicated formulas. May I draw the gentlemen's attention for instance to this article: An Easter program for the HP29C. In general, there are several ways of computing the Easter date. Gauss himself changed his formula several times. A good overview can be found in the respectice German wikipedia article. Please especially note the Lichtenberg formula at the end, as it directly includes two exceptions that else would have to be handled separately. Dieter |
|||
11-05-2015, 02:55 PM
Post: #14
|
|||
|
|||
RE: Wp34s date from DOY
(11-05-2015 01:30 PM)Dieter Wrote: Easter programs for programmable calculators have a long tradition – exactly because they handle these long and complicated formulas.Well, I prefer short and simple formulas, e.g. calculating the Christmas date. But seriously, since I'm atheist I'm not interested at all in any kinds of religious dates, and from a scientific point of view this Easter date is also absolutely uninteresting - it's just a 'human defined' special day of the year. Franz |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 8 Guest(s)