[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 19:10:13 +0300
> 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.