From f60f4463008489ece75c12f556954ee71e5f4b88 Mon Sep 17 00:00:00 2001 From: HuangRui Date: Thu, 12 Feb 2015 01:21:26 +0800 Subject: [PATCH] Floating point good. Revert LUA_NUMBER_FMT to "%.14g". --- app/lua/luaconf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/lua/luaconf.h b/app/lua/luaconf.h index 08c50c59..90da40dc 100644 --- a/app/lua/luaconf.h +++ b/app/lua/luaconf.h @@ -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 */