lua-users home
lua-l archive

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


> How do I check if x can be represented as a float? For example, for
> 64-bit integers and 64-bit floats, (1<<62)+5 cannot be represented
> as a float, but 1<<62 can.

print(x == math.tointeger(x+0.0))