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
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
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 »

 Messages In This Thread Accuracy and the power function - Dieter - 02-16-2014 02:43 PM RE: Accuracy and the power function - Joe Horn - 02-16-2014, 03:11 PM RE: Accuracy and the power function - Dieter - 02-16-2014, 05:45 PM RE: Accuracy and the power function - Joe Horn - 02-16-2014, 10:11 PM RE: Accuracy and the power function - Dieter - 02-18-2014, 08:28 PM RE: Accuracy and the power function - Joe Horn - 02-19-2014, 12:33 AM RE: Accuracy and the power function - Werner - 02-19-2014, 09:54 AM RE: Accuracy and the power function - walter b - 02-19-2014, 11:36 AM RE: Accuracy and the power function - Dieter - 02-19-2014, 12:35 PM RE: Accuracy and the power function - Werner - 02-19-2014, 11:47 AM RE: Accuracy and the power function - Werner - 02-19-2014, 01:07 PM RE: Accuracy and the power function - Dieter - 02-20-2014, 05:17 PM RE: Accuracy and the power function - Werner - 02-21-2014, 07:11 AM RE: Accuracy and the power function - Dieter - 02-23-2014, 02:19 PM RE: Accuracy and the power function - Thomas Klemm - 02-23-2014, 08:09 PM RE: Accuracy and the power function - Werner - 02-23-2014, 09:06 PM

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