Jump to content

Carmichael 3 strong pseudoprimes: Difference between revisions

Line 629:
 
=={{header|Perl 6}}==
{{works with|Rakudo|2015.12}}
An almost direct translation of the pseudocode. We take the liberty of going up to 67 to show we aren't limited to 32-bit integers. (Perl 6 uses arbitrary precision in any case.)
<lang perl6>for (2..67).grep: *.is-prime -> \Prime1 {
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.