Calculating e^x1 on classic HPs

01142016, 01:44 PM
Post: #14




RE: Calculating e^x1 on classic HPs
(01142016 02:47 AM)Gerson W. Barbosa Wrote: Still not elegant, but I decided to try a series approach. Starting with an empirical approximation (I noticed e^x  1 ~ e^(ln(x) + x/2) for small x), I came up with a new Taylor series  Well, at least apparently WA missed it... Bernoulli numbers? Waaaayyyy to complicated. ;) (01142016 02:47 AM)Gerson W. Barbosa Wrote: Only four terms of the summand would suffice for 10digit calculators in the specified range (five terms for 12digit calculators). Maybe you can take a look at the CF method in post #4. No transcendetal functions (except when e^x–1 is calculated the trivial way outside of the critical domain) and four loops will do for 10 digits as well. (01142016 02:47 AM)Gerson W. Barbosa Wrote: 2 LN EXM1 > 1. For the record: the exact 12digit results are 1 1,23000000756 E8 9,51625819640 E2 The method I suggested happens to return exactly these results. I did some further tests with several runs of 100.000 random numbers in [ln 0,9, ln 2] on a 34s in SP mode (16 digits) which showed that about 2/3 of the results were dead on an 99,5% within 1 ULP. However, there are rare cases where the result may be off by several ULP. BTW, does the builtin EXPM function really return 1.2300000076 E8, i.e. +4 ULP compared to the true result? Dieter 

« Next Oldest  Next Newest »

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