Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -2,14 +2,12 @@ fastfunc isprim num .
|
|||
# test only odd numbers
|
||||
i = 3
|
||||
while i <= sqrt num
|
||||
if num mod i = 0
|
||||
return 0
|
||||
.
|
||||
if num mod i = 0 : return 0
|
||||
i += 2
|
||||
.
|
||||
return 1
|
||||
.
|
||||
func nextprim num .
|
||||
fastfunc nextprim num .
|
||||
repeat
|
||||
num += 2
|
||||
until isprim num = 1
|
||||
|
|
@ -17,9 +15,7 @@ func nextprim num .
|
|||
return num
|
||||
.
|
||||
len d[][] 9
|
||||
for i to 9
|
||||
len d[i][] 9
|
||||
.
|
||||
for i to 9 : len d[i][] 9
|
||||
d[2][3] = 1
|
||||
p = 3
|
||||
for i to 1000000
|
||||
|
|
@ -27,10 +23,12 @@ for i to 1000000
|
|||
p = nextprim p
|
||||
d[pp mod 10][p mod 10] += 1
|
||||
.
|
||||
for i to 9
|
||||
for j to 9
|
||||
if d[i][j] > 0
|
||||
print i & " -> " & j & ": " & d[i][j] & " = " & d[i][j] / 10000 & "%"
|
||||
.
|
||||
for i to 9 : for j to 9
|
||||
if d[i][j] > 0
|
||||
write i & " -> " & j & ": "
|
||||
numfmt 5 0
|
||||
write d[i][j] & " = "
|
||||
numfmt 0 2
|
||||
print d[i][j] / 10000 & "%"
|
||||
.
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- 8 May 2025
|
||||
include Settings
|
||||
-- 23 Aug 2025
|
||||
include Setting
|
||||
numeric digits 10
|
||||
arg xx
|
||||
if xx = '' then
|
||||
|
|
@ -60,8 +60,4 @@ end
|
|||
say
|
||||
return
|
||||
|
||||
include Sequences
|
||||
include Functions
|
||||
include Special
|
||||
include Constants
|
||||
include Abend
|
||||
include Math
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue