isnan(complex(%inf,%inf)) returns %F: Yet, its angle can't be known over [0, pi/2] => isnan
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
To be a fixed number instead of a Nan, a complex must have a known modulus -- possibly infinite -- AND a known angle.
However, when both its real and imaginary parts are infinite, the angle is not known: We then know only the quarter on which it lays.
Hence,
c = complex(%inf*[1 1 -1 -1], %inf*[1 -1 1 -1]);
isnan(c) // should return only %T. It's not the case:
--> isnan(c)
ans =
F F F F
ERROR LOG:
----------
Wrong result
HOW TO REPRODUCE THE BUG:
-------------------------
c = complex(%inf*[1 1 -1 -1], %inf*[1 -1 1 -1]);
isnan(c)
OTHER INFORMATION:
------------------
Octave 4.0 wrongly returns %F too