[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: serialization of lua numbers
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Sun, 25 Mar 2012 23:20:32 +0300
> In Lua 5.2 you should use hexa-floats.
Does this means that %0.17g trick is not lossless for all finite
numbers or is there other downside to it?
Anyway, are you talking about the prinf '%a' option ? It doesn't work
with the lua 5.2r2 from luabinaries (which binds on msvcrt.dll on
win32). The manual is not helping either :)
PS: Now that Luiz mentioned the %0.17g trick, I had something to go
against lua-l and finally found some posts about this. eg. how this
was the default formatting many years ago[1] and now it's hiding
precision loss to make it look nice :)
[1] http://lua-users.org/lists/lua-l/2004-12/msg00027.html