RosettaCodeData/Task/Arithmetic-Rational/J/arithmetic-rational-7.j

2 lines
59 B
Plaintext

is_perfect_rational=: 2 = (1 + i.) +/@:%@([ #~ 0 = |) ]