Ilya Zakharevich on Thu, 12 Sep 2024 15:57:00 +0200


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

Re: The bug still remains in 2.16.2-beta


On Sun, Sep 08, 2024 at 03:06:05PM +0200, Bill Allombert wrote:
> > ./gp -p  4294967311
> > ? prime(203280222)
> > %7 = 15
> > (instead of 4294967357)
> 
> I fixed this bug, thanks for reporting it!

Great, thanks!

> > In any case since primes are stored as 32bit values, the limit
> > is 2^32.
> 
> Eventually, we could store primes as 64bit values and move the limit to 2^64.
> However 2^32 is nearly 10 more than the previous limit of 436273009,
> and the amount of memory required for the default value of 2^20 is 320kB

This exposition of the history is “on the sly side”.  For a decade,
gp/PARI allowed primelimits up to 2^32.  (Only after a bug in the
arena allocation code sneaked in and contaminated the optics of “what
is good and what is bad” the functionality of gp/PARI was reduced “to
the level of the current disaster”.)

Thanks again,
Ilya