- 注册时间
- 2007-12-26
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 539
- 在线时间
- 小时
|
发表于 2008-7-7 14:37:57
|
显示全部楼层
看看附件这个ecprime的威力吧
100亿的筛法只要4s(AMD 3600+ 单线程)
还能计算素数间距, K生素数等(这个不如我的程序)
有时间我将它改成多进程的,
四核机器百亿只要1s
以下是作者的help
23.10.2003, e0325944@student.tuwien.ac.at
help file, ecprime 1.4 by Kim Walisch
#--------------------------------------------------
version 1.4, 2003
ecprime [nr] [-n[nr]] [-s[s;u]] [-r[nr]] [-g[nr]] [-t[k]] [-p[k]] [-c] [-d]
#--------------------------------------------------
Usage:
# Count Functions
ecprime 1000
counts primes (0 - 1000)
ecprime 1000 -n100
counts primes (100 - 1000)
ecprime 1000 -n100 -t2
counts 2-tuplets (100 - 1000)
i.e -t3,-t4,-t5,-t6,-t7
# Print Functions
ecprime 1000 -p1
prints primes (0 - 1000) to primes.txt
ecprime 1000 -p2
prints 2-tuplets (0 - 1000) to 2-tuplets.txt
i.e -p3,-p4,-p5,-p6,-p7
# Settings
ecprime 1000 -s3
uses a sieve of 2^3KB, -s(0 - 24)
max speed for sieve = L1-cache
ecprime 1000 -s7;4
uses a sieve of 2^7 KB, divided into subsieves of 2^4 KB, fast for numbers > 10^12
ecprime 1000 -r17
uses a repetion field of 17#/30 bytes, -r(7 - 23)
see limits file for details
# Detailed Time Output, -d
time1: initialization repetition field
time2: initialization small primes
time3: sieving time (std)
# Prime Gaps
ecprime 1000 -g
prints first occurrence gaps to gaps.txt
ecprime 1000 -g100
prints first occurrence gaps (>100) to gaps.txt
ecprime 1000 -g100 -c
prints all prime gaps (>100) to gaps.txt |
-
-
ecprime.zip
172.28 KB, 下载次数: 30, 下载积分: 金币 -1 枚, 经验 1 点, 下载 1 次
|