Program listing for RPN Sunrise/Sunset
|
10-15-2017, 05:16 PM
(This post was last modified: 10-15-2017 06:05 PM by Dieter.)
Post: #6
|
|||
|
|||
RE: Program listing for RPN Sunrise/Sunset
(10-14-2017 09:20 PM)Craig Bladow Wrote: Still get a DATA ERROR, so need to do some more debugging. FTR: I tried the HP41 version in V41 and it works just fine. The times for today exactly match those from a good online calculator. However, I think the program can be improved. I also wonder if the FLOOR routine is really required. But I don't get any errors. At least not for my location and timezone. What values did you try? Edit: The program calculates floor(R10/90) and floor(R11/90). Both R10 and R11 are the result of a mod 360 operation which always returns a value >= 0. So I think the complete FLOOR routine is obsolete and can be replaced with a simple INT command. And maybe the whole thing can be done even more elegantly with MOD. Edit 2: I now have replaced the following lines of the original program... Code: 99 ATAN ...with this: Code: 99 ATAN And it seems to work. But please do your own tests and report here if you find any cases where errors occur. Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-14-2017, 04:10 PM
RE: Program listing for RPN Sunrise/Sunset - Dieter - 10-14-2017, 05:25 PM
RE: Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-14-2017, 05:44 PM
RE: Program listing for RPN Sunrise/Sunset - SlideRule - 10-14-2017, 06:26 PM
RE: Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-14-2017, 09:20 PM
RE: Program listing for RPN Sunrise/Sunset - Dieter - 10-15-2017 05:16 PM
RE: Program listing for RPN Sunrise/Sunset - Dieter - 10-16-2017, 11:15 AM
RE: Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-15-2017, 10:15 PM
RE: Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-16-2017, 02:10 AM
RE: Program listing for RPN Sunrise/Sunset - Craig Bladow - 10-17-2017, 01:14 PM
|
User(s) browsing this thread: 1 Guest(s)