Post Reply 
HP 17Bii date issue, what am I doing wrong?
12-11-2019, 09:27 AM (This post was last modified: 12-11-2019 10:23 AM by jthole.)
Post: #1
HP 17Bii date issue, what am I doing wrong?
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!

11C, 12C, 17Bii, DM42
Find all posts by this user
Quote this message in a reply
12-11-2019, 11:07 AM
Post: #2
RE: HP 17Bii date issue, what am I doing wrong?
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-11-2019, 11:08 AM
Post: #3
RE: HP 17Bii date issue, what am I doing wrong?
(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

11C, 12C, 17Bii, DM42
Find all posts by this user
Quote this message in a reply
Post Reply 




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