Post Reply 
HP42S making value comparisons
07-14-2020, 08:19 AM (This post was last modified: 07-14-2020 08:26 AM by ijabbott.)
Post: #3
RE: HP42S making value comparisons
Something like this should work:

X<> ST L
Rv
42 ; arbitrary real constant
RCL- ST L
X=0?
GTO "FOO"
RCL- ST L
+/-
....


LBL "FOO"
RCL- ST L
+/-
....

It uses LASTX for temporary storage like Valentin's solution, but allows the (real) constant to be entered literally. (It won't work for complex constants because you need two stack positions to enter a complex constant.)

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP42S making value comparisons - Davidy - 07-13-2020, 08:39 PM
RE: HP42S making value comparisons - ijabbott - 07-14-2020 08:19 AM



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