Bill Allombert on Fri, 01 Oct 2010 16:10:16 +0200


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

Re: fflog seg fault


On Fri, Oct 01, 2010 at 08:59:02AM -0400, Dan Bailey wrote:
> It does not appear to depend on the RNG seed.  Even after restarting
> PARI several times, I consistently get this behavior.

> Bill, on which platform is this working for you?

On linux, in 32bit and 64bit, with or without GMP.

Maybe you can try the daily SVN snapshot (a basic windows binary is available),
see http://pari.math.u-bordeaux.fr/download.html).

There might be a problem in your input:
gen64=ffgen(f64)
fflog(gen64^2,gen64)

The documentation says:
?? fflog
...
   If  no o is given,  assume that g is a primitive root. 

However, gen64 is not a primitive root (use ffprimroot for that).
? fforder(gen64)
%3 = 6148914691236517205
? 2^64-1
%4 = 18446744073709551615
? fflog(gen64^2,gen64)
%5 = 12297829382473034412

You should do
? o = fforder(gen64)
%11 = 6148914691236517205
? fflog(gen64^2,gen64,o)
%12 = 2

Cheers,
Bill.