lua-users home
lua-l archive

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


On Wed, Jul 10, 2019 at 11:39 PM Roberto Ierusalimschy wrote:
NaN and -0 have problems with the unification of constants used by the
compiler: NaN is not equal to NaN, while -0 is equal to 0.


BTW, there is an arithmetic bug in Lua 5.1 related to this "minus zero problem"
(this bug was fixed in 5.2 by allowing -0.0 and +0.0 to exist independently in constant table)
print(-0 < 1/0)  -- run in Lua 5.1