lua-users home
lua-l archive

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


2013/7/7 Sean Conner <sean@conman.org>:

>   "nan" seems to behave in an implementation dependent manner:
>
>> n1=0/0
>> n2=0/0
>> print (n1, n2, n1==n2, n1==n1)
> nan     nan     false   false

On the contrary. All implementations must do that. From the Lua Wiki:

    NaN is the only value that doesn't equal itself. -- DavidManura