You say:
when i do
nan - inf
i dont get-inf
i getnan
This is because any operation containing NaN
as an operand would return NaN
.
A comparison with NaN
would return an unordered result.
>>> float('Inf') == float('Inf')
True
>>> float('NaN') == float('NaN')
False