Front page | perl.perl6.language |
Postings from October 2001
Re: NaN semantics
Thread Previous
|
Thread Next
From:
Damian Conway
Date:
October 8, 2001 23:39
Subject:
Re: NaN semantics
Message ID:
200110090639.QAA03876@indy05.csse.monash.edu.au
> But I assume that == means numerically equal (and here I could be
> wrong). If what I assume is true however, then anything which doesn't
> have any numerical meaning, numerically compared to anything (even to
> itself) should not return the misleading result that the two compared
> values are numerically equal.
>
> Then again, if you tell me that == operator doesn't mean "numerically
> equal", I will agree that NaN==NaN should be true even considering that
> 'cat'=='dog' will also be true.
But 'cat'=='dog' *is* true. Numerically, they *are* equal.
They are equally not numbers. One should certainly get a warning
(and one will if warnings are enabled), but this
expression shouldn't return false.
Sigh. I *do* see your point of view (Laziness), but I still have immense
difficulty with the notion that:
$x == NaN
doesn't return true if $x contains NaN.
Damian
Thread Previous
|
Thread Next