[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Moving a program to Lua 5.3 [success]
- From: Enrico Colombini <erix@...>
- Date: Wed, 06 May 2015 14:14:52 +0200
On 05-May-15 12:28, Luiz Henrique de Figueiredo wrote:
You need to worry only if you program has been written as a integer-only code,
like the factorial example discussed earlier.
This morning I set out to convert four small programs and one mid-sized
program to Lua 5.3
The small programs just worked (some of them had trigonometric
functions, but they used math.floor() when the result had to be an integer.
The mid-sized program failed on a certain set of input data...
...but it turned out to be a mistake of mine three layers above: I
forgot that a certain non-critical value was not guaranteed to be an
integer and, as a consequence, a bitwise operation failed much later.
I could have 'fixed' it just before the bitwise operation to emulate Lua
5.2 behaviour, but of course I looked for its root cause.
So, it looks like I worried without reason about possible fp/int
problems, while in fact moving to Lua 5.3 has been painless for me.
Thanks for the excellent work on Lua... and for making me find an
obscure bug ;-)