Post Reply 
(11C) (15C) Very fast binary converter + fast modulo
03-17-2018, 06:06 PM
Post: #4
RE: (11C) Very fast binary converter + fast modulo

>The program uses this routine at LBL D for calculating x mod 2. This works well with the implemented method, calculating 2 · frac(x/2), but it's not a good idea for a general modulo function: try 25 mod 7 to get 3,999999997 instead of 4.

I actually tested that and it gave me 4, but I don't have a real calculator so I'm doing all this in the i11 Android app. Can anyone recommend a more accurate emulator?

> If you want to stay with the original method: this can be done without using a data register:

Heh, I ignored LastX and how stack lifting works because I didn't understand it quickly. I guess I should go back to reading the manual.

Also, how exactly are numbers stored in registers? The app I'm using might be inaccurate here, do real HP calculators use decimals with a floating point? Or is it binary?

> welcome to the [...]
Thank you both Smile
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: (11C) Very fast binary converter + fast modulo - Michael Zinn - 03-17-2018 06:06 PM

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