lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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