Sequence of primes by trial division: Difference between revisions
Content added Content deleted
Line 1,866: | Line 1,866: | ||
lazy_list(accumulate, 1/W, L). |
lazy_list(accumulate, 1/W, L). |
||
accumulate(M/[A|As], N/As, N) :- |
accumulate(M/[A|As], N/As, N) :- N is M + A. |
||
roll235wheel(Limit, A) :- |
roll235wheel(Limit, A) :- |
||
wheel235(W), |
wheel235(W), |
||
Line 1,895: | Line 1,894: | ||
X = 997. |
X = 997. |
||
</pre> |
</pre> |
||
=={{header|PureBasic}}== |
=={{header|PureBasic}}== |
||
<lang PureBasic>EnableExplicit |
<lang PureBasic>EnableExplicit |