[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Numeric key collision related bug in Lua 5.3
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 24 Apr 2015 06:19:02 -0300
> Agreed, I don’t see a cheap way to do this. I know you are wary of bloat in the libraries, but I wonder if a “math.le()” function that did the alternate form would be useful?
> function math.le(a, b)
> local ia, ib = math.tointeger(a), math.tointeger(b)
> if ia and ib then return ia <= ib else return a <= b end
I don't think that function is "correct" when f==2^64.