Bill Allombert on Sun, 24 May 2015 17:37:36 +0200


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

Re: keep flag=1 recursively in isprime


On Tue, May 05, 2015 at 10:53:11PM +0200, Pascal Molin wrote:
> isprime(p,1) calls Pocklington-Lehmer only at the first recursion level and
> then
> falls back to the check_prime rountine which may call APRCL.
> 
> Looking at the code I assume this is intentional but I find it misleading.
> I would prefer if the flag were kept recursively, or suggest having a
> stronger flag ensuring to use only the PL test -- in particular the
> returned certificate would never contain '2'.

This is not really practical. However, what should be done is
for check_prime to use the same criterion as BPSW_isprime_big,
instead of simply (expi(p) <= 250), otherwise

*  2  if x is a large prime whose primality could only sensibly be proven  (given the algorithms
implemented in PARI) using the APRCL test.

is a white lie.

Cheers,
Bill.