lua-users home
lua-l archive

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


> If you are using double-precision Lua numbers (the default), print them
> with %0.17g. This allows you to read them back without loss.

Thanks, that helped. Could you explain why %0.17g is a losless conversion?

To clarify, by "clean" I meant as clean as whatever the expression 5/6
prduces. I know a float's decimals are base2 so only multiple-of-2
decimals can be stored exactly.