cino hilliard on Thu, 27 Jan 2005 23:21:34 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: Pari/GP 2-2-9.exe bug report


Hi,
factor() works on my 256 meg ram 1ghz sys and the 2 gig ram 2.533 ghz systems
contfrac() you need to \p 300 for more precision.

From: "John Nicol" <johnnicol@email.com>
To: pari-users@list.cr.yp.to

Subject: Pari/GP 2-2-9.exe bug report
Date: Thu, 27 Jan 2005 13:34:54 -0500

Hi there,

I noticed the following behavior(s) which seem buggy to me. This is Pari-GP 2-2-9.exe. I am running Windows XP Professional with 1GB of memory.

#1:  Factoring above and beyond 2^122 seems to encounter problems.
(10:18) gp > factor(2^122 -1)
  *** factor: tempfile /tmp/FREL.400.3056 already exists.

        GP/PARI CALCULATOR Version 2.2.9 (development CHANGES-1.1093)
               i686 running cygwin (ix86 kernel) 32-bit version
              compiled: Dec 22 2004, gcc-3.4.1 (cygming special)
               (readline v5.0 enabled, extended help available)
(13:33) gp > factor(2^122 -1)
%19 =
[3 1]

[768614336404564651 1]

[2305843009213693951 1]


#2: contfrac(sqrt(x)) and contfrac(sqrt(x),n) terminate earlier than I would expect from definition. Rounding error? This is a quadratic surd, with infinitely many terms and period 2. Here I'm expecting arbitrarily many terms, but I only get 31.

(10:30) gp > contfrac(sqrt(15))
%22 = [3, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7]
(10:30) gp > contfrac(sqrt(15),,300)
%23 = [3, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7]

change your real precision \p 300 to get past the 28 digit default



Cino