lua-users home
lua-l archive

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


> 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