From 9cbf17b0f1bb4001b237c4027b271f0db9bde62c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 11 Sep 2018 08:39:12 -0300 Subject: Details (comments) --- llimits.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llimits.h') diff --git a/llimits.h b/llimits.h index e91310a0..8ab58b5c 100644 --- a/llimits.h +++ b/llimits.h @@ -298,7 +298,10 @@ typedef unsigned long Instruction; ** so it is better to use 'fmod'. 'fmod' gives the result of ** 'a - trunc(a/b)*b', and therefore must be corrected when ** 'trunc(a/b) ~= floor(a/b)'. That happens when the division has a -** non-integer negative result, which is equivalent to the tests below. +** non-integer negative result: non-integer result is equivalent to +** a non-zero remainder 'm'; negative result is equivalent to 'a' and +** 'b' with different signs, or 'm' and 'b' with different signs +** (as the result 'm' of 'fmod' has the same sign of 'a'). */ #if !defined(luai_nummod) #define luai_nummod(L,a,b,m) \ -- cgit v1.2.3-55-g6feb