Post Reply 
Calculating e^x-1 on classic HPs
02-02-2019, 07:22 PM
Post: #36
RE: Calculating e^x-1 on classic HPs
(01-16-2016 12:40 PM)Gerson W. Barbosa Wrote:  \[e^{x}-1=\frac{e^{x}-e^{-x}}{e^{-x}+1}\]

(01-16-2016 01:32 PM)Dieter Wrote:  ... there are two peaks at +4 and –4 ULP that also showed up in earlier tests. I wonder where these come from. Any idea?

My guess is that error goes at opposite direction, thus make things worse.

exp(x) = 1/exp(-x), so if exp(x) error is positive, exp(-x) is negative.

This made numerator even bigger.
Worse, denominator shrink. Errors reinforcing each other, making bad peaks !

This is very different than Kahan's calculating (exp(x)-1)/x via (u-1)/log(u)

For u close to 1, both numerator and denominator error goes the same way.
A bonus is that the size of error also similar size, cancelling each other.

Although calculated values of u-1 and log(u) are not accurate, the ratio is very good.
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 - Albert Chan - 02-02-2019 07:22 PM

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