Algorithm for entering numbers?
08-11-2019, 04:36 PM
Post: #1
 rea5245 Junior Member Posts: 8 Joined: Oct 2017
Algorithm for entering numbers?
Hi,

I'm implementing an RPN calculator and I'm confused about the algorithm for entering numbers. It's weird, since I've been using HPs for decades, and yet I realize now I'm not sure how they work!

When you type in a number, it goes into X. When you press Enter, it gets copied into Y. When you start entering a new number, it overwrites what's in X.

But if you type in a number, do not hit Enter, but you hit 1/x, the X register holds the result. Then, when you start entering a new number, the result of 1/x gets pushed into Y before you overwrite X.

So sometimes when you start typing a number, it simply overwrites; other times, it pushes then overwrites.

How does an HP calc decide whether to push X or not?

Thank you,
Bob
 « Next Oldest | Next Newest »

 Messages In This Thread Algorithm for entering numbers? - rea5245 - 08-11-2019 04:36 PM RE: Algorithm for entering numbers? - Thomas Okken - 08-11-2019, 04:57 PM RE: Algorithm for entering numbers? - Ángel Martin - 08-11-2019, 05:06 PM RE: Algorithm for entering numbers? - rea5245 - 08-11-2019, 05:37 PM RE: Algorithm for entering numbers? - Csaba Tizedes - 08-11-2019, 06:35 PM RE: Algorithm for entering numbers? - rprosperi - 08-11-2019, 07:03 PM RE: Algorithm for entering numbers? - rea5245 - 08-11-2019, 07:17 PM RE: Algorithm for entering numbers? - Thomas Okken - 08-11-2019, 07:38 PM RE: Algorithm for entering numbers? - Ángel Martin - 08-12-2019, 05:36 AM RE: Algorithm for entering numbers? - grsbanks - 08-12-2019, 08:08 AM RE: Algorithm for entering numbers? - Ángel Martin - 08-12-2019, 08:34 AM RE: Algorithm for entering numbers? - Thomas Okken - 08-12-2019, 10:26 AM RE: Algorithm for entering numbers? - Albert Chan - 08-19-2019, 06:29 PM RE: Algorithm for entering numbers? - rprosperi - 08-19-2019, 06:49 PM RE: Algorithm for entering numbers? - ijabbott - 08-19-2019, 06:52 PM RE: Algorithm for entering numbers? - grsbanks - 08-20-2019, 07:51 AM RE: Algorithm for entering numbers? - Thomas Okken - 08-20-2019, 11:07 AM RE: Algorithm for entering numbers? - grsbanks - 08-20-2019, 11:29 AM RE: Algorithm for entering numbers? - grsbanks - 08-12-2019, 10:44 AM RE: Algorithm for entering numbers? - grsbanks - 08-12-2019, 09:09 AM RE: Algorithm for entering numbers? - Paul Dale - 08-12-2019, 10:54 AM RE: Algorithm for entering numbers? - Ángel Martin - 08-12-2019, 12:44 PM RE: Algorithm for entering numbers? - pier4r - 08-17-2019, 07:35 PM

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