Karim Belabas on Mon, 26 May 2014 15:43:35 +0200


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

Re: bug in PARI/GP (Segmentation Fault), please report.


* John W. Nicholson [2014-05-26 15:00]:
> Thanks for the answer so far. But now this leads to another issue. What is the best thing to do for programs which use default(primelimit) without the primelimit being set in .gprc?  After commenting the line "primelimit = 1G", I get for:
> 
> default(primelimit)
> 500000

default(primelimit) is now a no-op. It can only be set on startup, 
then no longer changed.

> Which in turn causes the programs which depend on higher values of
> primelimit to have good output to end up failing.

Can you send a simple example to the list ?

The whole point of our switching to a generic iterator over primes was
to remove dependencies on such a precomputed prime list. You can now do
something like

{
  forprime(p = 10^100, /* FOREVER! */,
    if (... p is nice ..., return(p));
  )

}

with the default primelimit = 500000, i.e. without using any relevant
precomputed primes (on my machine the iterator provides about 10^7
primes per minute in this range).

So why do you need a large 'primelimit' for your program to function properly ? 

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`