detail (macro 'luai_numidiv' uses 'luai_numdiv' to compute the division)

This commit is contained in:
Roberto Ierusalimschy
2014-12-29 11:27:55 -02:00
parent 1a7868c1d5
commit a1c37f834a

View File

@@ -1,5 +1,5 @@
/* /*
** $Id: luaconf.h,v 1.236 2014/12/19 13:31:12 roberto Exp roberto $ ** $Id: luaconf.h,v 1.237 2014/12/26 14:44:44 roberto Exp roberto $
** Configuration file for Lua ** Configuration file for Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -476,7 +476,7 @@
#include <math.h> #include <math.h>
/* floor division (defined as 'floor(a/b)') */ /* floor division (defined as 'floor(a/b)') */
#define luai_numidiv(L,a,b) ((void)L, l_mathop(floor)((a)/(b))) #define luai_numidiv(L,a,b) ((void)L, l_mathop(floor)(luai_numdiv(L,a,b)))
/* /*
** module: defined as 'a - floor(a/b)*b'; the previous definition gives ** module: defined as 'a - floor(a/b)*b'; the previous definition gives