Pythagorean triples: Difference between revisions
J: minor speedup -- mostly from discarding the "eliminate dups" step
m (→{{header|Icon}} and {{header|Unicon}}: performance) |
(J: minor speedup -- mostly from discarding the "eliminate dups" step) |
||
Line 189:
'm n'=. |:(#~ 1 = 2 | +/"1)(#~ >/"1),/,"0/~}.i.<.%:y
prim=. (#~ 1 = 2 +./@{. |:) (#~ y>:+/"1)m (-&*:,. +:@*,. +&*:) n
/:~;<@(,.~
)</lang>
|