[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: why tostring for number use LUA_NUMBER_FMT "%.14g", not "%.16g" ?
- From: pulleyzzz_gmail <pulleyzzz@...>
- Date: Sat, 7 Sep 2013 23:29:18 +0800
for this code:
a=tostring(1/3)
print(1/3==tonumber(a)) -- false
--if use .16g
a=string.format('%.16g',1/3)
print(1/3==tonumber(a)) -- true