[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in LNUM patch
- From: Asko Kauppi <askok@...>
- Date: Tue, 1 Jun 2010 09:05:22 +0300
Fix to this problem was figured out and placed to my personal svn
(where LNUM can be downloaded).
svn co svn://slugak.dyndns.org/public/2010/LNUM2
However, I do not intend to make new "distribution" of this, nor carry
on the LNUM patch to Lua 5.2.
Flemming Madsen kirjoitti 17.5.2010 kello 8:55:
This is about Lua *with* the lnum patch (And I know, there's still no
This is all beside the point. The whole thing was brought to my
attention by the fact that string.format("%d", 1.00001) was ok while
string.format("%d", 0.999999) would give an error.
This what the sample Lua session in my first post tried to show.
On Sun, May 16, 2010 at 11:43 AM, David Kastrup <email@example.com> wrote:
Flemming Madsen <firstname.lastname@example.org> writes:
On Wed, May 12, 2010 at 4:58 AM, Richard Hundt <email@example.com
Integers are defined as a subset of real numbers that are
*whole* (i.e which
can be written without a fractional or decimal component).
-1.0 < x < 1.0 therefore *cannot* be integers, so unless I've
the existing behaviour was exactly what you wanted there.
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
There is no difference between 0 and 0.0 for Lua.