lua-users home
lua-l archive

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



On 30-Nov-04, at 5:26 AM, Luiz Henrique de Figueiredo wrote:

Floating-point -> text conversion is not a light job. Of course, in your application, you may be able to get away with simple code, but in general.
if you want to have reversible conversions, then there's a lot to do.

That is true. One issue I've had from time to time is that the default
  #define LUA_NUMBER_FMT        "%.14g"
is not long enough to do reversible conversions on doubles. I believe
you need %.19g for the conversion to be reversible.