Accuracy and the power function
|
02-16-2014, 02:43 PM
(This post was last modified: 02-16-2014 05:31 PM by Dieter.)
Post: #1
|
|||
|
|||
Accuracy and the power function
Recently I posted a HP35s program that determines the Bernoulli numbers \(B_n\). The formula includes powers of \(2\large\pi\) with exponents up to 372. Since \(\large\pi\) carries just 12 digits, the results with large exponents are somewhat inaccurate even though the 12-digit-value agrees with the true value rounded to 13 digits, so that the relative error in \(\large\pi\) is less than 6,6 E-14.
While this deviation can be compensated quite easily, there is another error that can reach magnitudes I did not expect. In the mentioned program it here and there may cause error peaks while most other results are within 2 ULP. Let's assume \(2\large\pi\) = 6,28318530718, i.e. the best possible 12-digit value. Now evaluate some powers of this: \(6,28318530718^{-76} = 2,179 3651 6466 35... · 10^{-61}\) \(6,28318530718^{ 200} = 4,324 8761 1407 46... · 10^{ 159}\) \(6,28318530718^{ 372} = 8,373 5772 1132 00... · 10^{ 296}\) Please try this with your 12-digit HP and see what you get. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)