lua-users home
lua-l archive

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


> I tried putting 0/0 into the Lua 5.4.0 interpreter and got a value of -nan.
> I am just wondering why the negative sign.  I know that the value is
> mathematically undefined, but I sort of expected nan.

This is something from the hardware. If you do that in C, which
generates the obvious machine code, it results in -nan too.

-- Roberto