Post Reply 
Calculating e^x-1 on classic HPs
01-13-2016, 06:43 PM (This post was last modified: 01-13-2016 06:57 PM by Dieter.)
Post: #11
RE: Calculating e^x-1 on classic HPs
(01-13-2016 03:46 PM)Gerson W. Barbosa Wrote:  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}\]

Ah, that's the inverse of the method I suggested for ln(1+x) in 2014, cf. this thread.

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

Accuracy problems have also been addressed in the mentioned 2014 thread. That's why back then I suggested another ln(1+x) method using sinh.

On the other hand a dedicated ex–1 function is only required for ln 0,9 < x < ln 2, and here your method works fine. One might add two additional tests to check whether the argument is within these bounds or not. Which again makes the method less elegant...

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-13-2016 06:43 PM



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