擂台:筛法求质数Sieve of Eratosthenes
筛法求质数Sieve of Eratosthenes描述:
http://primes.utm.edu/glossary/page.php?sort=SieveOfEratosthenes
相关帖子:
擂台:求N!的最后九个非零尾数
http://expert.csdn.net/Expert/topic/2986/2986867.xml?temp=.511532
##谁愿意帮我做个测试,最好是P4的CPU!##
http://expert.csdn.net/Expert/topic/3027/3027142.xml?temp=.850918
程序下载(最新版,暂不提供源码,仍在不断改进中):
http://www.77studio.net/files/PrimeLabPro.zip
参考源代码:
http://www.77studio.net/files/PrimeLab_Src.zip
http://www.77studio.net/files/PrimeLab_Src_New.zip (比前一个新)
另一种更快的方法:
Sieve of Atkins
介绍:http://primes.utm.edu/links/programs/sieves/binary_quadratic/index.html
程序:http://www.77studio.net/files/SieveAtkins.zip
特别感谢xstring(麻雀), liangbch(宝宝), languagec(各有所求)(是从你的帖子开始研究质数的^_^)等,只为交流,适当的时候会和大家分享代码。
注:
以上未嵌入汇编,未使用ICC(Intel C++ Compiler)优化,VS 6.0 + SP5编译