more useful options | |
PerlMonks |
Re^3: ulam's spiral too slowby liverpole (Monsignor) |
on Apr 16, 2007 at 12:53 UTC ( [id://610337]=note: print w/replies, xml ) | Need Help?? |
Thanks for catching that. I just noticed the bug in my code, which is: although I'm caching prime numbers, I'm not testing all of them as potential factors.
I'll go update the code now, but you're right; there needs to be a check for division by 2. s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|