(11C) (15C) Very fast binary converter + fast modulo
03-17-2018, 06:06 PM
Post: #4
 Michael Zinn Member Posts: 57 Joined: Mar 2018
RE: (11C) Very fast binary converter + fast modulo
Hi!

>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
 « Next Oldest | Next Newest »

 Messages In This Thread (11C) (15C) Very fast binary converter + fast modulo - Michael Zinn - 03-14-2018, 10:07 PM RE: (11C) Very fast binary converter + fast modulo - Dieter - 03-16-2018, 01:08 PM RE: (11C) Very fast binary converter + fast modulo - Michael Zinn - 03-17-2018 06:06 PM RE: (11C) Very fast binary converter + fast modulo - Dieter - 03-17-2018, 09:17 PM RE: (11C) (15C) Very fast binary converter + fast modulo - Steve Simpkin - 03-03-2024, 07:25 PM RE: (11C) Very fast binary converter + fast modulo - Gene - 03-16-2018, 03:47 PM RE: (11C) Very fast binary converter + fast modulo - Michael Zinn - 03-18-2018, 12:14 AM RE: (11C) (15C) Very fast binary converter + fast modulo - johnb - 03-03-2024, 08:53 PM RE: (11C) (15C) Very fast binary converter + fast modulo - John Keith - 03-03-2024, 10:34 PM RE: (11C) Very fast binary converter + fast modulo - Michael Zinn - 04-05-2018, 03:25 PM RE: (11C) (15C) Very fast binary converter + fast modulo - Thomas Klemm - 03-03-2024, 09:39 AM RE: (11C) (15C) Very fast binary converter + fast modulo - Thomas Klemm - 03-03-2024, 09:01 PM RE: (11C) (15C) Very fast binary converter + fast modulo - Steve Simpkin - 03-03-2024, 09:15 PM RE: (11C) (15C) Very fast binary converter + fast modulo - Thomas Klemm - 03-03-2024, 10:51 PM

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