Post Reply 
Calculating e^x-1 on classic HPs
01-12-2016, 08:16 PM (This post was last modified: 01-12-2016 08:43 PM by Dieter.)
Post: #8
RE: Calculating e^x-1 on classic HPs
(01-11-2016 10:20 PM)Dieter Wrote:  On a classic HP it could look like this:
(...)

The code shown in the initial post uses the complete stack, OTOH it returns both ex and ex–1 in Y and X.

The following version returns ex–1 while it saves the Y-register. It also does not use R^ which is missing on some of the classic calculators.

Code:
e^x
ENTER
ENTER
LastX
x<>y
LN
-
x<>y
x
LastX
1
-
+
RTN

And using the 35s in equation mode (as well as one data register) it can even be done in a single line:

Code:
EXP(REGX)►U–1+(REGX–LN(U))*U

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


Messages In This Thread
Calculating e^x-1 on classic HPs - Dieter - 01-11-2016, 10:20 PM
RE: Calculating e^x-1 on classic HPs - Dieter - 01-12-2016 08:16 PM



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