Pisano period: Difference between revisions
m
no edit summary
(→{{header|Perl 6}}: Perl 6 incorrect) |
mNo edit summary |
||
Line 576:
=={{header|Perl 6}}==
{{incorrect|Perl 6|Pisano period (p, 1) for integers 1 to 180 is incorrect. Many odd values instead of only one for pisano(2).}}▼
{{works with|Rakudo|2020.02}}
Didn't bother making two differently named routines, just made a multi that will auto dispatch to the correct candidate.
Line 604 ⟶ 605:
.put for (1..180).map( { pisano-period($_) } )».fmt('%4d').batch(15);</lang>
{{out}}
▲{{incorrect|Perl 6|Pisano period (p, 1) for integers 1 to 180 is incorrect. Many odd values instead of only one for pisano(2).}}
<pre>Pisano period (p, 2) for primes less than 50
6 24 100 112 110 364 612 342 1104 406 930 2812 1640 3784 1504
|