[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __eq operator behavior
- From: Dirk Laurie <dpl@...>
- Date: Wed, 30 Mar 2011 20:37:16 +0200
On Wed, Mar 30, 2011 at 03:06:30PM +0200, Guilherme Destefani wrote:
>
> Please note that the plain number NaN ~= NaN return true:
NaN is not-a-number. Yes, it is a configuration of 64 bits.
Yes, it can be the result of an operation in IEEE 754 arithmetic.
Yes, it can be stored in a Lua TValue of type 'number'.
But it is not a number.
The test you quote is the standard Lua idiom to test for NaN.
Dirk