Floating point good. Revert LUA_NUMBER_FMT to "%.14g".

This commit is contained in:
HuangRui 2015-02-12 01:21:26 +08:00
parent f3540ffe29
commit f60f446300
1 changed files with 1 additions and 2 deletions

View File

@ -601,8 +601,7 @@ extern int readline4lua(const char *prompt, char *buffer, int length);
#endif // #if !defined LUA_INTEGRAL_LONGLONG
#else
#define LUA_NUMBER_SCAN "%lf"
//#define LUA_NUMBER_FMT "%.14g"
#define LUA_NUMBER_FMT "%g"
#define LUA_NUMBER_FMT "%.14g"
#endif // #if defined LUA_NUMBER_INTEGRAL
#define lua_number2str(s,n) c_sprintf((s), LUA_NUMBER_FMT, (n))
#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */