cino hilliard on Wed, 21 Jan 2004 19:57:51 +0100

 Re: 28 digit precision and large number ratios

```Hi All,

Please iake a look at the following output  for function g(n) = (n+1)/(n+2)
This should be .9999..  or 1.0000... for large n. Notice below some trials.
There appears to be a glitch in \p 28

c:\pari\gpfiles>gp

GP/PARI CALCULATOR Version 2.2.7 (development CHANGES-1.844)
i686 running cygwin (ix86 kernel) 32-bit version
compiled: Oct 28 2003, gcc-3.3.1 (cygming special)
(readline v4.3 enabled, extended help available)

Copyright (C) 2003 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and
comes WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

realprecision = 28 significant digits
seriesprecision = 16 significant terms
format = g0.28

parisize = 4000000, primelimit = 2000000000
(12:29) gp > g(n) = (n+1)/(n+2)
(12:29) gp > g(nextprime(10^10))
%1 = 10000000020/10000000021
(12:29) gp > g(nextprime(10^10)+.0)
%2 = 0.9999999999000000002099999995
(12:30) gp > g(nextprime(10^90)+.0)
%3 = 1.000000000000000000000000000

Glitch?
(12:30) gp > g(nextprime(10^100)+.0)
%4 = 0.000000000000000000000000000000000000
(12:43) gp > g(nextprime(10^100)+.0)
%16 = 0.000000000000000000000000000000000000
(12:43) gp > g(nextprime(10^101)+.0)
%17 = 0.000000000000000000000000000000000000
(12:43) gp > g(nextprime(10^110)+.0)
%18 = 0.000000000000000000000000000000000000
Strannge. Why the drop in 0's?
(12:43) gp > g(nextprime(10^120)+.0)
%19 = 1.000000000000000000000000000
(12:44) gp > g(nextprime(10^130)+.0)
%20 = 1.000000000000000000000000000

these are ok
(12:30) gp > \p 14
realprecision = 19 significant digits (14 digits displayed)
(12:30) gp > g(nextprime(10^100)+.0)
%6 = 1.0000000000000
Ok.
(12:30) gp > \p 100
realprecision = 105 significant digits (100 digits displayed)
(12:30) gp > g(nextprime(10^100)+.0)
```
%7 = 0.9999999999999999999999999999999999999999999999999999999999999999999999999
```999999999999999999999999999
(12:30) gp > g(nextprime(10^200)+.0)
```
%8 = 1.0000000000000000000000000000000000000000000000000000000000000000000000000
```00000000000000000000000000
(12:31) gp > \p 14
realprecision = 19 significant digits (14 digits displayed)
(12:31) gp > g(nextprime(10^200)+.0)
%9 = 1.0000000000000
(12:31) gp >

Thank,
Cino
"Behavior is not for the pursuit of survival but because of it."

_________________________________________________________________
```
```