Post Reply 
H->HMS conversion HP-15C vs. HP42S vs HP67
09-13-2018, 01:46 PM
Post: #57
RE: H->HMS conversion HP-15C vs. HP42S vs HP67
(09-13-2018 08:47 AM)Pekis Wrote:  I'm trying to help rounding up to next integer when it's very close.
So, I transformed
INT(X) into INT(X+0.75*(1-FP(X)))
and INT(60*X) into INT(60*X+0.75*(1-FP(60*X)))

My advise is give up fixing the 60 seconds bug (sorry for the put down ...)
The fix may be worse for the "numbers". (and you don't know when that hit)

Before the fix, we may see 60 seconds, sometimes 60 minutes, but it is accurate.
A little cleaning-up, and we are good ...

After the fix, potentially you get into fixing phantom bug, similar to +25 seconds patch:
Just an example, on HP-12C, try X = 1000.999999:

Pekis DEG->DMS formula: (90*X + INT(60*X) + 100*INT(X)) / 250

Old DMS = (90*X + 60059 + 100*1000)/250 = 1000.5960 (= 1001 degree)

Using above "fuzzy" INT for INT, we get:

New DMS = (90*X + 60059 + 100*1001)/250 = 1000.9960 (= 1001 degree 40 minutes)

Similar search should discover "40-seconds bug" too ...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: H->HMS conversion HP-15C vs. HP42S vs HP67 - Albert Chan - 09-13-2018 01:46 PM



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