hermann on Tue, 06 Feb 2024 18:14:51 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: nonprime(n) |
On 2024-02-06 08:40, Aurel Page wrote:
257M is overkill. $ gp -p4M ? for(n=1,2^18, prime(n)); time = 1,315 ms. We have all the necessary primes: ? prime(2^18) % = 3681131 Cheers, Aurel
And why is forprime() so fast without -p...? hermann@7950x:~$ gp -q ? c=0;forprime(p=2,oo,c+=1;if(c==2^18,print(p);break())); 3681131 ? ## *** last result: cpu time 60 ms, real time 60 ms. ? Regards, Hermann.