无心人
发表于 2008-3-24 16:24:04
哈
如果可行, 并不会让C产生汇编,直接写就是了
sir_chen
发表于 2009-12-8 21:19:26
感觉意义不大
keeya0416
发表于 2010-3-17 17:05:06
这个最大会不会不是收敛的呢
wayne
发表于 2011-7-11 22:46:27
不错!
顶起来,回头再看看
tprime
发表于 2012-3-11 10:36:37
1# 无心人
我的筛法经过优化,需找最大素数间隔每秒能达到10^9, 离楼主目标10万亿(10^12)/s 差距甚远
C:\Windows\system32\cmd.exe /c PrimeNumber62
--------------------------------------------------------------------
Count/Sieve number of primes in (0, 1E19 + 1E13), version 1.8
Implemented by the segmented sieve of eratosthenes
Copyright @ by Huang Yuanbing 2011 - 2012 bailuzhou@163.com
--------------------------------------------------------------------
--------------------------------------------------------------------
Compiled by Mingw/g++ 4.6.3 on 10:50:33 Mar 11 2012
Cpu arch = x86, cores = 4, SSE4_Popcnt = 0
Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, L2 cache = 256 kB
--------------------------------------------------------------------
: ASM_X86 = 0, LIANGBCH = 1
: SIEVE_SIZE = 1024k, BLOCK_SIZE = 32k, PDIFF = 255
--------------------------------------------------------------------
--------------------------------------------------------------------
-------------------start count primes -------------------
Prime = 1000000033, save primes gap use 0.326 sec
init bucket list time use 1.528 sec and sieve size = 1024 k
PI = 24127085, time use 1.427 sec
-------------------start find max gap -------------------
init bucket list time use 1.513 sec and sieve size = 1024 k
time use 1.442 sec, maxp prime gap = 744 on 1000000000696148003
: y 1 e10
-------------------start find max gap -------------------
time use 3.417 sec, maxp prime gap = 354 on 4302407359
: y 1e16 1e10
-------------------start find max gap -------------------
init bucket list time use 0.182 sec and sieve size = 1024 k
time use 12.062 sec, maxp prime gap = 648 on 10000004892952351
:
熊一兵广义概率
发表于 2020-3-30 23:02:03
定理:x内最大相邻素数间距记为D(x),则:
D(x)=(lnx)^2