Anonymous user
Pythagorean quadruples: Difference between revisions
→{{header|zkl}}: tweak
(→{{header|zkl}}: added code) |
(→{{header|zkl}}: tweak) |
||
Line 255:
solution:=Data(max_number+1,Int).fill(0); # another byte array
foreach d in ([1..max_number]){
d2 := d * d;
foreach c in ([1..d-1]){
▲ if(solution[ d ]) continue; # lots of solutions
diff2 := d2 - ( c * c );
if(sum_of_two_squares[ diff2 ]) solution[ d ] = True;
|