Calculating e^x1 on classic HPs

01142016, 01:48 PM
(This post was last modified: 01142016 02:53 PM by Dieter.)
Post: #15




RE: Calculating e^x1 on classic HPs
(01142016 07:20 AM)Paul Dale Wrote: Ah, interesting. I have been looking for an equivalent to Kahan's ln(1+x) method, but I could not find anything. Where is this documented? Or is this "Dale's method" ?) Adding another test (before the other two) may speed up the code as it avoids the log in the last line: Code: if v >= 1, return v I did a few test runs on a 34s in SP mode with 100000 random numbers each. About 45% were exact, and another 45% was within ±1 ULP. Another 9% was ±2 ULP and the rest had larger errors. So accuracy varies a bit more than with the method I suggested (90% vs. 99,5% within ±1 ULP). Note: I originally posted that the results using your method were at most –1 ULP off. Sorry, this is wrong, there was an error in the test routine. #) Dieter 

« Next Oldest  Next Newest »

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