Accuracy summation question
09-06-2023, 07:30 PM
Post: #1
 lrdheat Senior Member Posts: 856 Joined: Feb 2014
Accuracy summation question
I calculated 2000! in home by summing from 1 to 2000 log (x), and taking 10^answer, getting 3.316274+ E5735

On the WP34S, I directly get 3.31627509245+ E5735

On my CASIO 991CW, using the summation method used on prime, I got 3.3162750924 E5735

On my CASIO 9750giii, I got 3.316275094 E5735

The CASIO 991CW uses 22 or 23 significant digits in its calculations, may help explain close agreement with the WP34S.

I was surprised that the Prime in home disagreed with the others in just the 6th decimal.
09-07-2023, 08:38 AM (This post was last modified: 09-07-2023 09:05 AM by rkf.)
Post: #2
 rkf Member Posts: 78 Joined: Apr 2014
RE: Accuracy summation question
(09-06-2023 07:30 PM)lrdheat Wrote:  I calculated 2000! in home by summing from 1 to 2000 log (x), and taking 10^answer, getting 3.316274+ E5735

On the WP34S, I directly get 3.31627509245+ E5735
...

I was surprised that the Prime in home disagreed with the others in just the 6th decimal.

It´s indeed strange (altough I would say it differs in the seventh place, ...487 vs. 509). Assuming the LOGs are calculated correctly to 12 digits with values rising from 0 to about 3.3, the error of one summand should be less than +/- 5E-12
If the error in summation propagates normally, I would expect in the sum an error of ca. sqrt(2000)*(+/- 5E-12) < 2.3E-10

Taking 10^ this I get 1.00000000051, so I would nevertheless expect about 9 correct places, and not 7. :-(

Addendum: BTW I just compared with my HP50g, which gives exactly the same result of 5735.52065052 for the sum of logarithms as the prime, thus indicating the 12digits arithmetics core engine is the same.
09-07-2023, 10:40 AM (This post was last modified: 09-07-2023 10:42 AM by Albert Chan.)
Post: #3
 Albert Chan Senior Member Posts: 2,555 Joined: Jul 2018
RE: Accuracy summation question
(09-07-2023 08:38 AM)rkf Wrote:  It´s indeed strange (altough I would say it differs in the seventh place, ...487 vs. 509).

log10(3.31627487E5735) vs log10(3.31627509E5735)
=      5735.52065052       vs      5735.52065055

For 12 decimal digits, 1 .. 2000 log10 sum, error is just 3 ULP.

But we are mapping sum with 10^, IP goes to exponent, FP goes to mantissa.
FP with 7 digits accuracy translate to about 7 digits mantissa with 10^, as expected.

10^(FP*(1+ε)) = 10^FP * e^(ln(10)*FP*ε) ≈ 10^FP * (1 + ln(10)*FP*ε)

0.5207*ln(10) ≈ 0.5207/0.4343 ≈ 1.20      // FP → mantissa relative error expanded a little.
09-07-2023, 08:29 PM
Post: #4
 byoung Junior Member Posts: 20 Joined: Jul 2022
RE: Accuracy summation question
OK, this is probably a dumb question, but how are you guys getting such large exponents? Mine maxes out at E499.

- Bruce
09-08-2023, 01:38 AM (This post was last modified: 09-08-2023 01:44 AM by Gerson W. Barbosa.)
Post: #5
 Gerson W. Barbosa Senior Member Posts: 1,580 Joined: Dec 2013
RE: Accuracy summation question
(09-07-2023 08:29 PM)byoung Wrote:  OK, this is probably a dumb question, but how are you guys getting such large exponents? Mine maxes out at E499.

Just using property of logarithms.

Sum(n=1,2000,log(n)) = 5735.52065052 (hp 50g)

-> 2000! 10^0.520652*10^5735

2000! = 3.31627(487045)*10^5735
09-08-2023, 01:04 PM
Post: #6
 byoung Junior Member Posts: 20 Joined: Jul 2022
RE: Accuracy summation question
(09-08-2023 01:38 AM)Gerson W. Barbosa Wrote:
(09-07-2023 08:29 PM)byoung Wrote:  OK, this is probably a dumb question, but how are you guys getting such large exponents? Mine maxes out at E499.

Just using property of logarithms.

Sum(n=1,2000,log(n)) = 5735.52065052 (hp 50g)

-> 2000! 10^0.520652*10^5735

2000! = 3.31627(487045)*10^5735

Thanks. I just thought you had discovered some way to put the calculator into a high-precision mode, which I didn't think was possible.

- Bruce
 « Next Oldest | Next Newest »

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