Calculating e^x-1 on classic HPs
|
01-14-2016, 06:42 PM
(This post was last modified: 01-14-2016 07:10 PM by Dieter.)
Post: #18
|
|||
|
|||
RE: Calculating e^x-1 on classic HPs
(01-14-2016 03:55 PM)emece67 Wrote:(01-14-2016 01:48 PM)Dieter Wrote: I did a few test runs on a 34s in SP mode with 100000 random numbers each. (...) Simple. Write a short test program on the 34s emulator (the "real thing" is quite fast, but too slow for tasks like this). Evaluate ex–1 for a random argument within the desired domain, using the method you want to test. Then determine the difference to the exact result provided by the internal function. The result is an integer (the number of ULPs the approximation is off). Increment one of, say, 11 registers that count the number of occurences for ≤–5, –4, –3, ... , +4, ≥+5 ULP. Do this 100.000 times. ;-) Using the same seed for the random number generator, this is what I got for the Kahan method resp. the one suggested in this thread. The results of the two different runs are quite similar. Code: seed = 4711 n = 100000 seed = 0,815 n = 100000 Re. the meaning of the two seed values, cf. this thread. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)