[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua minus null (-0)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 9 Jun 2011 09:21:39 -0300
> #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)+0.0)
That seems to work but can be confusing as well:
z=0 a=z b=-z print(a,b,a==b,1/a,1/b)
now prints
0 0 true inf -inf
when it originally printed
0 -0 true inf -inf
I'm afraid there is no simple solution.
- References:
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), Henk Boom
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), Everett L Williams II
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup
- Re: Lua minus null (-0), Dirk Laurie
- Re: Lua minus null (-0), David Kastrup