Post Reply 
Calculating e^x-1 on classic HPs
02-04-2019, 07:28 PM
Post: #40
RE: Calculating e^x-1 on classic HPs
Quote:expm1(x) = (u-1) - (ln(u) - x) * u, where u = exp(x), rounded

log1p( x ) = ln(u) - ((u-1) - x) / u, where u = 1+x, rounded

A really short prove of above formulas: If z ≈ x, f(x) ≈ f(z) + (x-z) * f'(z)

expm1(x) = expm1(z) + (x-z) * exp(z)
log1p(x) = log1p(z) + (x-z) * 1/(1+z)

Let z = ln(exp(x)), rounded for expm1 eqn, and z = (1+x)-1, rounded for log1p, we get the quoted formulas.
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-04-2019 07:28 PM



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