diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-09-11 08:39:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-09-11 08:39:12 -0300 |
commit | 9cbf17b0f1bb4001b237c4027b271f0db9bde62c (patch) | |
tree | 22f7efcbec00a08d7204c0b3d3cc4968d3535798 /llimits.h | |
parent | 5382a22e0eea878339c504b2a9a3b36bcd839fcc (diff) | |
download | lua-9cbf17b0f1bb4001b237c4027b271f0db9bde62c.tar.gz lua-9cbf17b0f1bb4001b237c4027b271f0db9bde62c.tar.bz2 lua-9cbf17b0f1bb4001b237c4027b271f0db9bde62c.zip |
Details (comments)
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -298,7 +298,10 @@ typedef unsigned long Instruction; | |||
298 | ** so it is better to use 'fmod'. 'fmod' gives the result of | 298 | ** so it is better to use 'fmod'. 'fmod' gives the result of |
299 | ** 'a - trunc(a/b)*b', and therefore must be corrected when | 299 | ** 'a - trunc(a/b)*b', and therefore must be corrected when |
300 | ** 'trunc(a/b) ~= floor(a/b)'. That happens when the division has a | 300 | ** 'trunc(a/b) ~= floor(a/b)'. That happens when the division has a |
301 | ** non-integer negative result, which is equivalent to the tests below. | 301 | ** non-integer negative result: non-integer result is equivalent to |
302 | ** a non-zero remainder 'm'; negative result is equivalent to 'a' and | ||
303 | ** 'b' with different signs, or 'm' and 'b' with different signs | ||
304 | ** (as the result 'm' of 'fmod' has the same sign of 'a'). | ||
302 | */ | 305 | */ |
303 | #if !defined(luai_nummod) | 306 | #if !defined(luai_nummod) |
304 | #define luai_nummod(L,a,b,m) \ | 307 | #define luai_nummod(L,a,b,m) \ |