[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua minus null (-0)
- From: David Kastrup <dak@...>
- Date: Thu, 09 Jun 2011 12:53:27 +0200
Dirk Laurie <dpl@sun.ac.za> writes:
> On Thu, Jun 09, 2011 at 11:15:00AM +0200, David Kastrup wrote:
>> > Maybe _because_ it's hard to distinguish them otherwise? :-)
>> > Anyway, this is a question to ask of the people who define
>> > the behaviour of C formatting.
>>
>> C has a separate integer type.
>
> The design decision to be made by the Lua designers is basically
> what to put in luaconf.h. At present, it says:
>
> #define LUA_NUMBER_FMT "%.14g"
> #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n))
>
> Are you (who obviously are arguing for the sheer joy of it) or any
> of the people who are genuinely perplexed by -0, seriously suggesting
> that Luiz should replace these two clear, effective lines by some
> tortuous coding involving a test on n?
You mean, tortuous coding like
#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)+0.0)
?
--
David Kastrup
- References:
- Lua minus null (-0), Sebastian
- 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