diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-06-09 11:21:00 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-06-09 11:21:00 -0300 |
| commit | 16e8bb360bb9b26f501808cf3e738a636ee5f11e (patch) | |
| tree | db9ea631d2fe4b4869f8dc7cb6e80aa56a268e84 | |
| parent | 6628012e9e3a066070e0e214d3b02f0146544489 (diff) | |
| download | lua-16e8bb360bb9b26f501808cf3e738a636ee5f11e.tar.gz lua-16e8bb360bb9b26f501808cf3e738a636ee5f11e.tar.bz2 lua-16e8bb360bb9b26f501808cf3e738a636ee5f11e.zip | |
comment
| -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) \ |
