Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -23,6 +23,6 @@ F primorial(n)
|
|||
R r
|
||||
|
||||
print(‘First ten primorials: ’(0.<10).map(n -> primorial(n)))
|
||||
L(e) 6
|
||||
L(e) 0.<6
|
||||
V n = 10 ^ e
|
||||
print(‘primorial(#.) has #. digits’.format(n, String(primorial(n)).len))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
fastfunc isprim num .
|
||||
i = 2
|
||||
while i <= sqrt num
|
||||
if num mod i = 0
|
||||
return 0
|
||||
.
|
||||
if num mod i = 0 : return 0
|
||||
i += 1
|
||||
.
|
||||
return 1
|
||||
|
|
@ -35,19 +33,15 @@ func[] bnmul a[] b[] .
|
|||
.
|
||||
r[ia + ib - 1] += h
|
||||
.
|
||||
while r[$] = 0
|
||||
len r[] -1
|
||||
.
|
||||
while r[$] = 0 : len r[] -1
|
||||
return r[]
|
||||
.
|
||||
func$ str bn[] .
|
||||
for i = len bn[] downto 1
|
||||
s$ &= bn[i]
|
||||
.
|
||||
for i = len bn[] downto 1 : s$ &= bn[i]
|
||||
return s$
|
||||
.
|
||||
func bndlen b[] .
|
||||
return (len b[] - 1) * 7 + floor log10 b[$] + 1
|
||||
return (len b[] - 1) * 7 + floor log b[$] 10 + 1
|
||||
.
|
||||
primor[] = [ 1 ]
|
||||
prim = 2
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- 8 May 2025
|
||||
include Settings
|
||||
-- 24 Aug 2025
|
||||
include Setting
|
||||
|
||||
say 'PRIMORIAL NUMBERS'
|
||||
say version
|
||||
|
|
@ -8,7 +8,7 @@ call GetPrimes -9
|
|||
call ShowFirst10
|
||||
call GetPrimes -1e6
|
||||
call UseFloat 1e6
|
||||
call UseInt 1e4
|
||||
call UseInt 1e5
|
||||
exit
|
||||
|
||||
GetPrimes:
|
||||
|
|
@ -81,9 +81,4 @@ end
|
|||
say Format(Time('e'),,3) 'seconds'; say
|
||||
return
|
||||
|
||||
include Numbers
|
||||
include Functions
|
||||
include Special
|
||||
include Sequences
|
||||
include Constants
|
||||
include Abend
|
||||
include Math
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue