Thank you for the pointer to ispseudoprimepower. I was not able to locate it with ???
? ???isprimepower
isprimepower
As for the global option, I do not have a particular instance to share. My question is motivated by the set-and-forget approach - I do not want to analyze for each function whether it uses isprime() is ispseudoprime(), but just to specify my preference once and be sure that every function follows it. It will allow, say, to run some preliminary code backboned by ispseudoprime(), but then use the same code backboned by isprime() when the primality certainty is important.
For example, as far as I remember, nextprime() and prevprime() rely on ispseudoprime(). However, following the logic with isprimepower() / ispseudoprimepower() there should have been function nextpseudoprime() and prevpseudoprime(). Rather than having all these variants distinguishing *prime() and *pseudoprime() functions (and changing the code from using ones to the others), it'd be much easier to have a global option for prime testing preference so that each *prime() function would rely on isprime() or ispseudoprime() accordingly.
Regards,
Max
On Thu, Oct 03, 2024 at 01:45:06PM -0400, Max Alekseyev wrote:
> Hello,
>
> It looks like isprimepower() relies on isprime() - is there a way to make
> it use ispseudoprime() instead?
Use ispseudoprimepower ?
> In general, I'd like to have a global option that will use ispseudoprime()
> instead of isprime() everywhere where primality testing is needed. Is there
> such a thing?
Is there instance when it is not already the case that are problematic to you ?
The only default currently relevant is "factor_proven".
Cheers,
Bill