diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-01-29 14:00:40 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-01-29 14:00:40 -0200 |
commit | 181a837cac39fe9a411b64d67239d98785518c33 (patch) | |
tree | a152450c524d9aef4cde0f667fdb53677b64fb4f /llimits.h | |
parent | 0730a56d38241d70f49cc6fe650c4995fe7dcb2c (diff) | |
download | lua-181a837cac39fe9a411b64d67239d98785518c33.tar.gz lua-181a837cac39fe9a411b64d67239d98785518c33.tar.bz2 lua-181a837cac39fe9a411b64d67239d98785518c33.zip |
small improvement in the support of 'float' as lua_Number
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.100 2012/10/01 14:14:45 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.101 2012/10/02 17:32:44 roberto Exp roberto $ |
3 | ** Limits, basic types, and some other `installation-dependent' definitions | 3 | ** Limits, basic types, and some other `installation-dependent' definitions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -282,7 +282,7 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; | |||
282 | #include <math.h> | 282 | #include <math.h> |
283 | 283 | ||
284 | #define luai_hashnum(i,n) { int e; \ | 284 | #define luai_hashnum(i,n) { int e; \ |
285 | n = frexp(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ | 285 | n = l_tg(frexp)(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ |
286 | lua_number2int(i, n); i += e; } | 286 | lua_number2int(i, n); i += e; } |
287 | 287 | ||
288 | #endif | 288 | #endif |