[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?
- From: Justin Cormack <justin@...>
- Date: Tue, 10 Sep 2013 10:31:00 +0100
On 10 Sep 2013 10:24, "steve donovan" <steve.j.donovan@gmail.com> wrote:
>
> On Tue, Sep 10, 2013 at 10:44 AM, Tim Hill <drtimhill@gmail.com> wrote:
> > Wonderful.
>
> Absolutely. Wanting to serialize floats 'exactly' using strings is not
> the way to go. Integers (up to the 2^52 limit) are fine, and 5.3 gives
> us full (signed) 64-bit integer precision.
>
LuaJIT can format hex floats which are useful for this.
Justin
- References:
- why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, pulleyzzz_gmail
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Leo Razoumov
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Coda Highland
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Dirk Laurie
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Coda Highland
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Dirk Laurie
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Coda Highland
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Roberto Ierusalimschy
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Tim Hill
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Dirk Laurie
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, Tim Hill
- Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?, steve donovan