diff options
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) \ |