Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
f60f4463
Commit
f60f4463
authored
Feb 12, 2015
by
HuangRui
Browse files
Floating point good. Revert LUA_NUMBER_FMT to "%.14g".
parent
f3540ffe
Changes
1
Show whitespace changes
Inline
Side-by-side
app/lua/luaconf.h
View file @
f60f4463
...
@@ -601,8 +601,7 @@ extern int readline4lua(const char *prompt, char *buffer, int length);
...
@@ -601,8 +601,7 @@ extern int readline4lua(const char *prompt, char *buffer, int length);
#endif // #if !defined LUA_INTEGRAL_LONGLONG
#endif // #if !defined LUA_INTEGRAL_LONGLONG
#else
#else
#define LUA_NUMBER_SCAN "%lf"
#define LUA_NUMBER_SCAN "%lf"
//#define LUA_NUMBER_FMT "%.14g"
#define LUA_NUMBER_FMT "%.14g"
#define LUA_NUMBER_FMT "%g"
#endif // #if defined LUA_NUMBER_INTEGRAL
#endif // #if defined LUA_NUMBER_INTEGRAL
#define lua_number2str(s,n) c_sprintf((s), LUA_NUMBER_FMT, (n))
#define lua_number2str(s,n) c_sprintf((s), LUA_NUMBER_FMT, (n))
#define LUAI_MAXNUMBER2STR 32
/* 16 digits, sign, point, and \0 */
#define LUAI_MAXNUMBER2STR 32
/* 16 digits, sign, point, and \0 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment