lua-users home
lua-l archive

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



On Sep 8, 2013, at 9:41 AM, Coda Highland <chighland@gmail.com> wrote:

And this is of course a perfectly valid concept, but that doesn't
change the fact that tostring() really OUGHT to output enough digits
to ensure a clean round trip. Since it's not only possible but trivial
to do so, and since tostring() is the closest thing Lua has to
built-in serialization, doesn't it stand to reason that it SHOULD?

/s/ Adam

Or, to flip the question around the other way, why DOES tostring() use %.14g? Was there some issue that caused a problem if it was more than 14? Better compatibility across platforms? Or just an arbitrary choice?

--Tim