De Polignac numbers: Difference between revisions
→{{header|Perl}}: removed the bigint pragma, as the code was painfully slow
(Added Sidef) |
(→{{header|Perl}}: removed the bigint pragma, as the code was painfully slow) |
||
Line 1,302:
{{libheader|ntheory}}
<syntaxhighlight lang="perl" line>use v5.36;
use ntheory <is_prime vecmax vecany logint>;
Line 1,311 ⟶ 1,310:
while ($n++) {
next unless $n % 2;
next if vecany { is_prime($n -
push @D, comma $n;
last if 10_000 == @D;
|