lua-users home
lua-l archive

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


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