diff options
-rw-r--r-- | llimits.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.133 2015/03/04 13:31:21 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.134 2015/03/06 19:49:50 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 | */ |
@@ -261,11 +261,11 @@ typedef unsigned long Instruction; | |||
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | /* | 263 | /* |
264 | ** module: defined as 'a - floor(a/b)*b'; the previous definition gives | 264 | ** modulo: defined as 'a - floor(a/b)*b'; this definition gives NaN when |
265 | ** NaN when 'b' is huge, but the result should be 'a'. 'fmod' gives the | 265 | ** 'b' is huge, but the result should be 'a'. 'fmod' gives the result of |
266 | ** result of 'a - trunc(a/b)*b', and therefore must be corrected when | 266 | ** 'a - trunc(a/b)*b', and therefore must be corrected when 'trunc(a/b) |
267 | ** 'trunc(a/b) ~= floor(a/b)'. That happens when the division has a | 267 | ** ~= floor(a/b)'. That happens when the division has a non-integer |
268 | ** non-integer negative result, which is equivalent to the test below | 268 | ** negative result, which is equivalent to the test below. |
269 | */ | 269 | */ |
270 | #if !defined(luai_nummod) | 270 | #if !defined(luai_nummod) |
271 | #define luai_nummod(L,a,b,m) \ | 271 | #define luai_nummod(L,a,b,m) \ |