Post Reply 
Algorithm for entering numbers?
08-11-2019, 04:36 PM
Post: #1
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Algorithm for entering numbers? - rea5245 - 08-11-2019 04:36 PM



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