RosettaCodeData/Task/Test-integerness/PARI-GP/test-integerness.parigp

3 lines
114 B
Plaintext

isInteger(z)=real(z)==real(z)\1 && imag(z)==imag(z)\1;
apply(isInteger, [7, I, 1.7 + I, 10.0 + I, 1.0 - 7.0 * I])