lua-users home
lua-l archive

Re: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?

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


2013年9月8日 Coda Highland <chighland@gmail.com>:
> while tostring(tonumber(x)) can't be a guaranteed round-trip,
> tonumber(tostring(x)) CAN be, by making tostring() output enough
> digits.
For a certain meaning of "enough", yes. Is "enough" 17 digits,
though? Interesting but decidedly non-trivial question!

AltStyle によって変換されたページ (->オリジナル) /