Post Reply 
Comparisons with zero on HP-65
08-30-2017, 06:43 PM (This post was last modified: 08-30-2017 06:55 PM by Dieter.)
Post: #7
RE: Comparisons with zero on HP-65
(08-29-2017 10:32 PM)Mark Hardman Wrote:  How about:

Code:
e^x
STO 8
CLx
LSTx
DSZ
GTO
<false>
<true>

Works for small values of x (-227 <= x <= 222).

Let me see if I understand this.

For x > ln 2 the e^x command returns a value > 2. So DSZ decrements this to a value >1 and the next step is not skipped.

For 0 < x < ln 2 the e^x command returns a value between 1 and less than 2. So DSZ decrements this to something between 0 and 0,999... and the next step is skipped.

For x < 0 the e^x command returns a value between 0 and less than 1. So DSZ decrements this to something between -1 and 0. I assume that this causes the next step to be skipped.

Somewhere between x=–23 and x=–24 the e^x result is so close to 0 that DSZ decrements this to a plain –1. I don't know how if the HP65 then skipped the next step or not, but I can say that the HP67 does not (!).

But this way the threshold for skip/no-skip is not 0, but ln 2 = 0,6931...
And maybe there is a second threshold somewhere below –20 (not sure).

Did I miss something here?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Comparisons with zero on HP-65 - Dieter - 08-30-2017 06:43 PM



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