Bill Allombert on Mon, 20 Nov 2023 23:18:32 +0100


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

Re: Question on ternary quadratic form


On Fri, Nov 17, 2023 at 03:01:53PM +0100, hermann@stamm-wilbrandt.de wrote:
> For tqf.gp nearly all runtime is spent in this loop:
> 
>         for(vv=0,oo,
>             if(ispseudoprime((4*vv+1)*n-1),
>                 v=vv; break()));

The difference is that tqf is calling ispseudoprime on numbers of size n, while
threesquares only call ispseudoprime on numbers of size about sqrt(n).

If you like to have an assert() that you can easily disable, you can define it as

assert(b,s="assert") = if(!b(),error(Str(s)));

and then replace

assert(COND)
by 
assert(()->COND)

This way you can disable assert() by refinining it as
assert(b,s)=;
and COND will not be evaluated.

Cheers,
Bill