XP is just a number  
PerlMonks 
Re^2: pythagorean triplesby jgamble (Pilgrim) 
on Apr 24, 2006 at 21:21 UTC ( #545395=note: print w/ replies, xml )  Need Help?? 
True, but it's fairly easy to filter out the nonprimitives. If m and n are both even, skip (a, b, and c will all be divisible by two). If m and n are both odd, skip (a, b, and c will all be divisible by two). If m and n have a divisor in common (e.g., GCD{12,3} != 1) skip (a, b, and c will have that factor in common). The first case can be wrapped up in third case (actually, it can be wrapped up in the second case too), but I find that it makes things clearer to separate them out.
In Section
Code Catacombs

