HP Forums

Full Version: HP 17Bii date issue, what am I doing wrong?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.
(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
Reference URL's