hermann on Sun, 24 Mar 2024 20:59:43 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Question on PARI/GP realprecision |
On 2024-03-24 09:53, Karim Belabas wrote:
If you want to convince yourself that precision is not the culprit, compute the sum of the 1/p, instead of 1.0/p. You'll get a *very* large rational number, exactly equal to the sum (this is a very wasteful way to compute, as the denominator is going to be the product of all primes in the list, but it's a doable calculation).You will then be able to check that this (exactly known) number does notbelong to your expected interval. Cheers, K.B.
Thanks! hermann@7950x:~$ gp -q ? # timer = 1 (on) ? P=extern("curl -s https://oeis.org/A080076/a080076.json.txt"); cpu time = 118 ms, real time = 1,417 ms. ? s=0;foreach(P,p,s+=1/p); cpu time = 18,464 ms, real time = 18,469 ms. ? type(s) "t_FRAC" ? #digits(numerator(s)) cpu time = 171 ms, real time = 187 ms. 1365297 ? #digits(denominator(s)) cpu time = 172 ms, real time = 173 ms. 1365298 ? numerator(s)*10^11\denominator(s) 74739239028 ?
Sum_{n>=1} 1/a(n) is in the interval (0.7473924793, 0.7473924795) (Borsos etal., 2022). - Amiram Eldar, Jan 29 2022
Regards, Hermann.