[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit 2.0 jit bug with and/or expression?
- From: Francesco Abbate <francesco.bbt@...>
- Date: Tue, 10 Apr 2012 22:53:08 +0200
2012/4/10 Felix Wu <fsw534@gmail.com>:
> The following function ran fine with JIT off (-joff) for both LuaJIT
> 2.0 beta 8 and 9, but got erroneous results with JIT on. Is this a
> known bug?
Hi,
don't know if this is a known bug or not but I was surprised that such
a simple example can produce an error of this kind.
I've made some tests and the bug disappear if you use a more
conventional if/then/else construct:
if n < 2 then
return 1
else
return fib(n-1) + fib(n-2)
end
Francesco