lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lua 5.3 returns positive infinity for a negative zero denominator, which
is a change from 5.1, 5.2 and LuaJIT. Unless I am missing something,
this does not seem to be fixed in 5.3.1 or listed on the bug page[1].

liam@dmail00:~$ lua53
Lua 5.3.0  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> return 1/-0
inf
> os.exit()
liam@dmail00:~$ lua52
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> return 1/-0
-inf
> os.exit()
liam@dmail00:~$ lua51
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> return 1/-0
-inf
> os.exit()
liam@dmail00:~$ luajit
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> return 1/-0
-inf
> os.exit()


[1] http://www.lua.org/bugs.html
-- 
Liam

Attachment: signature.asc
Description: OpenPGP digital signature