Post Reply 
Comparisons with zero on HP-65
08-30-2017, 09:08 PM
Post: #8
RE: Comparisons with zero on HP-65
(08-30-2017 06:43 PM)Dieter Wrote:  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

DSZ only skips 2 steps if the value in R8 is exactly zero after being decremented by 1. After posting I realized that there are underflow conditions that will result in e^x returning a value of exactly 1. Results of e^x where -1e-11 <= x <= 1e-10 will also return exactly 1.

I concede that it is not the best solution, but it might have some value in limited cases.

Mark Hardman

Ceci n'est pas une signature.
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 - Mark Hardman - 08-30-2017 09:08 PM



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