HP Forums
HP 17Bii date issue, what am I doing wrong? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP 17Bii date issue, what am I doing wrong? (/thread-14149.html)



HP 17Bii date issue, what am I doing wrong? - jthole - 12-11-2019 09:27 AM

This equation works on the iPhone HP 17Bii simulator, but gives a "SOLUTION NOT FOUND" error on the actual HP 17Bii calculator. Where it goes wrong is in the DATE(actual_date:#days) function. If I put in a numerical value for #days, the equation works on the calculator, but when I use a calculated value, it fails. Should I do something different, or is this not possible in the 17Bii?

The equation should give the date of the first Advent Sunday:

advdate = date(xmas:(7*fp(ddays(1.011900:xmas:1)/7)+22)*-1)

If I change the second argument of date() in a constant, then it works. I have also tested putting the second argument in a variable first, and using that variable in the date() function, with the same result (SOLUTION NOT FOUND). Again, this works in the iPhone simulator, but fails on the calculator.

Thanks!

Edit: found it; I should put RND(x:0) around it, to avoid rounding errors!


RE: HP 17Bii date issue, what am I doing wrong? - Dave Britten - 12-11-2019 11:07 AM

You can also try using the MOD function to avoid relying on the precision of FP and RND. MOD(x:y) will return x mod y.


RE: HP 17Bii date issue, what am I doing wrong? - jthole - 12-11-2019 11:08 AM

(12-11-2019 11:07 AM)Dave Britten Wrote:  You can also try using the MOD function to avoid relying on the precision of FP and RND. MOD(x:y) will return x mod y.

Thanks! Looks like I will post a revised Advent Sunday equation soon Smile