Bill Allombert on Fri, 27 Sep 2019 16:51:05 +0200


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

Re: qfbsolve (and ispseudoprime)


On Fri, Sep 27, 2019 at 02:58:43PM +0200, Paul Underwood wrote:
> It is a pity that the function qfbsolve is much slower in 2.12 alpha
> where it solves for composite n too.
> 
> For example:
> 
> gettime();k=198;n=2^k-3;if(qfbsolve(Qfb(1,0,1),n),print([k,gettime()]))
> 
> overflows the default stack whereas it gives an almost instantaneous
> answer with version 2.11 and version 2.9.

Hello Paul, 

The problem is that qfbsolve is trying to factor n.
If you want to avoid that, you can give the factorisation of n instead
of n:
qfbsolve(Qfb(1,0,1),Mat([n,1]))
or even
qfbsolve(Qfb(1,0,1),[n,Mat([n,1])])

> Also, qfbsolve(Qfb(1,0,1),n) *was* quicker than ispseudoprime for
> positive integers of the form 4*K+1,

Could you provide examples ?

Cheers,
Bill