lua-users home
lua-l archive

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

On Jul 24, 2013, at 4:48 PM, Roberto Ierusalimschy <> wrote:

> The difference between integers and floats should not bother most
> programmers, but it is not transparent (e.g., you can distinguish them
> using a clever piece of code). It is not totally unlike +0.0 versus
> -0.0, which are equal all the time except when they are not.
> (Actually, the only use I see for this functionality is when linearizing
> data, so that we can save an integer as an integer and a float as a
> float. I do not know of any other real use.)
> The fact that most people should not bother with this difference was
> the initial motivation to put the distinction in the debug library.

Will this remain true if (when?) the bit operator library gets extended to 64 bits? So far as I understand it, values between 2^52 and 2^64 are going to be a gray area in this case, since the "same" numeric value will behave differently depending on if its held as an integer or floating point?