[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3: 1 Month of use
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 4 Mar 2014 14:45:19 -0300
> > x == math.ifloor(x) ?
>
> If ifloor rounds that's very unexpected and unobvious behavior. I'd
> expect ifloor(0.9999999) to return 0, but ifloor(1.000001) to return
> 1. Meanwhile, I would expect, say, iround(0.9999999) to return 1.
I do not see what is the problem here. I could use iround, with the
same results. Whatever integer value the function returns for 0.9999999,
tha value is not going to be equal to 0.999999. What is unexpected here?
-- Roberto