On Jan 24, 2:28 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
> > That doesn't follow. The problem is not that x < nan returns False
> > because that is correct since x isn't smaller than nan. The problem
> > is cmp(x, nan) returning 1, because that indicates that x is greater
> > than nan and that isn't true.
>
> Please report the problem. cmp(), min() and max() don't treat NaNs
> right. I don't think that x < nan == False is the correct answer, too.
> But I've to check the IEEE 754 specs. IMHO < nan and > nan should raise
> an exception.
>
> Christian

To a floating point interested layman such as I, treating not-a-number
comparisons with floats should give the same result as comparing a
fileobject (also not-a-number), with a float. Or does nan have /need a
more domain specific interpretation?

- Paddy.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to