Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -1,15 +1,18 @@
Main:
-- 22 Mar 2025
include Settings
say version; say 'Legendre Prime counter (no memoization)'; say
say 'LEGENDRE PRIME COUNTER (NO MEMOIZATION)'
say version
say
numeric digits 10
do n = 0 to 9
call Time('r')
a = 10**n; p = pi(a)
a = 10**n; p = Pie(a)
say '10^'n Right(p,9) Format(Time('e'),3,3)'s'
end
exit
Pi:
Pie:
procedure expose prim.
arg xx
if xx < 3 then
@ -22,7 +25,7 @@ procedure expose prim.
arg xx,yy
if yy < 2 then
return xx-(xx%2)*(yy=1)
p = prim.prime.yy
p = prim.yy
if xx <= p then
return 1
return Phi(xx,yy-1)-Phi(xx%p,yy-1)

View file

@ -1,15 +1,18 @@
Main:
-- 22 Mar 2025
include Settings
say version; say 'Legendre Prime counter (with memoization)'; say
say 'LEGENDRE PRIME COUNTER (WITH MEMOIZATION)'
say version
say
numeric digits 10
do n = 0 to 9
call Time('r')
a = 10**n; p = Pi(a)
a = 10**n; p = Pie(a)
say '10^'n Right(p,9) Format(Time('e'),3,3)'s'
end
exit
Pi:
Pie:
procedure expose prim. work.
arg xx
if xx < 3 then
@ -23,7 +26,7 @@ procedure expose prim. work.
arg xx,yy
if yy < 2 then
return xx-(xx%2)*(yy=1)
p = prim.prime.yy
p = prim.yy
if xx <= p then
return 1
if work.xx.yy > 0 then

View file

@ -1,6 +1,9 @@
Main:
-- 22 Mar 2025
include Settings
say version; say 'Legendre Prime counter (sieving)'; say
say 'LEGENDRE PRIME COUNTER (SIEVING)'
say version
say
numeric digits 10
do n = 0 to 8
call Time('r')