Teach HSCT to download sources from git
[harbours.git] / lua / log2.patch
blob05c0f3d0a7bae2e92102a493b04c43ea4945405b
1 --- lua-5.3.5/src/lmathlib.c
2 +++ lua-5.3.5/src/lmathlib.c
3 @@ -176,6 +176,21 @@
4 return 1;
7 +double log2(double x)
8 +{
9 + return log(x) / log(2.0);
12 +float log2f(float x)
14 + return log(x) / log(2.0f);
17 +long double log2l(long double x)
19 + return log(x) / log(2.0l);
22 static int math_log (lua_State *L) {
23 lua_Number x = luaL_checknumber(L, 1);
24 lua_Number res;