lua-users home
lua-l archive

Re: Negative zero denominator

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


On 21/08/15 08:54 AM, Philipp Janda wrote:
Am 21.08.2015 um 13:43 schröbte Liam Devine:
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()
There is no negative zero integer. Try `1/-0.0`.
Philipp
https://en.wikipedia.org/wiki/Ones'_complement
--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.

AltStyle によって変換されたページ (->オリジナル) /