Wagstaff primes: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Raku}}: avoid needless stringification, better concurrency) |
|||
Line 91: | Line 91: | ||
# However many I have patience for |
# However many I have patience for |
||
my $count = 20; |
my atomicint $count = 20; |
||
hyper for @wagstaff[20] .. * { |
hyper for @wagstaff[20] .. * { |
||
next unless .is-prime; |
next unless .is-prime; |
||
say ++$count ~ ": $_ ({sprintf "%.2f", now - $elapsed})" and $elapsed = now if is-prime |
say ++⚛$count ~ ": $_ ({sprintf "%.2f", now - $elapsed})" and $elapsed = now if is-prime (1 + 1 +< $_)/3; |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
{{out}} |
{{out}} |