[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in LNUM patch
- From: David Kastrup <dak@...>
- Date: Sun, 16 May 2010 20:43:14 +0200
Flemming Madsen <lua@themadsens.dk> writes:
>> 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
>
> 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()
There is no difference between 0 and 0.0 for Lua.
--
David Kastrup