summaryrefslogtreecommitdiff
path: root/external/mit/lua/dist/src/lmathlib.c
diff options
context:
space:
mode:
authormbalmer <mbalmer@NetBSD.org>2015-10-08 13:21:00 +0000
committermbalmer <mbalmer@NetBSD.org>2015-10-08 13:21:00 +0000
commit649cf8e53381cbc6057d92bbf44588bb7024bdd2 (patch)
tree37d60c2028507b3425901810054e008ce1f65440 /external/mit/lua/dist/src/lmathlib.c
parent14a62719979f511f0c63a80b66d3ca7202ffc862 (diff)
update after conflict resolution
Diffstat (limited to 'external/mit/lua/dist/src/lmathlib.c')
-rw-r--r--external/mit/lua/dist/src/lmathlib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/external/mit/lua/dist/src/lmathlib.c b/external/mit/lua/dist/src/lmathlib.c
index edcbbafbde3..ffae9aa2c9b 100644
--- a/external/mit/lua/dist/src/lmathlib.c
+++ b/external/mit/lua/dist/src/lmathlib.c
@@ -1,5 +1,7 @@
+/* $NetBSD: lmathlib.c,v 1.4 2015/10/08 13:21:00 mbalmer Exp $ */
+
/*
-** $Id: lmathlib.c,v 1.3 2015/02/02 14:03:05 lneto Exp $
+** Id: lmathlib.c,v 1.115 2015/03/12 14:04:04 roberto Exp
** Standard mathematical library
** See Copyright Notice in lua.h
*/
@@ -183,6 +185,9 @@ static int math_log (lua_State *L) {
res = l_mathop(log)(x);
else {
lua_Number base = luaL_checknumber(L, 2);
+#if !defined(LUA_USE_C89)
+ if (base == 2.0) res = l_mathop(log2)(x); else
+#endif
if (base == 10.0) res = l_mathop(log10)(x);
else res = l_mathop(log)(x)/l_mathop(log)(base);
}