| Bill Allombert on Tue, 27 Oct 2026 15:54:58 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Aw: Re: ispseudoprime speed-up |
On Tue, Oct 27, 2026 at 02:23:42PM +0000, Paul Underwood wrote: > <html><body><div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: #ffffff;">Yes I forgot to <span style="background-color: #ffffff;">test for</span> even numbers.</span></div> [[ Please avoid HTML-only email, this makes GP code harder to extract, thanks!]] ispseudoprime is garanteed up to 2^64 (https://www.cecm.sfu.ca/Pseudoprimes/index-2-to-64.html) This is a very useful property. Is your test proven up to sme bound ? But fundamentally we need two functions ispseudoprime(p) when we expect p to be prime isnotpseudoprime(n) when we expect n to be composite. For example ? n=2^12800+7; ? ispseudoprime(n) %12 = 0 *** last result: cpu time 310 ms, real time 310 ms. ? tstwbar2(n) %13 = 0 *** last result: cpu time 703 ms, real time 705 ms. Cheers, Bill.