Post Reply 
Calculating e^x-1 on classic HPs
01-13-2016, 03:46 PM
Post: #10
RE: Calculating e^x-1 on classic HPs
(01-12-2016 08:16 PM)Dieter Wrote:  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

Very nice, thank you!

Just tested it on the HP-12C. I've tried an hyperbolic function approach on the HP-15C using the identity

\[e^{x}-1=\frac{2}{\coth \frac{x}{2}-1}\]

Code:

001-42.21.11   f LBL A
002-          2     2
003-         10     / 
004-42.22.25   f HYP TAN
005-         15    1/x
006-           1    1
007-         30     -
008-           2    2
009-         34     x<>y
010-         10     /
011-     43 32  g RTN

However this will require two additional steps to handle x=0. Also, for |x| > 3 the results start to lose accuracy as tanh(|x/2|) approaches 1.

Congratulations for your brilliant method!

Gerson.
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 - Gerson W. Barbosa - 01-13-2016 03:46 PM



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