lua-users home
lua-l archive

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


I already knew that, thanks.

The practical implication however is that -1.0 < x < 1.0 can not be
*cast* to integers. At least not by the %d operator of string.format()

On Wed, May 12, 2010 at 4:58 AM, Richard Hundt <richardhundt@gmail.com> wrote:

> Integers are defined as a subset of real numbers that are *whole* (i.e which
> can be written without a fractional or decimal component). Numbers between
> -1.0 < x < 1.0 therefore *cannot* be integers, so unless I've misunderstood,
> the existing behaviour was exactly what you wanted there.
>
> http://en.wikipedia.org/wiki/Integer
>
> Cheers,
> Rich
>