LCOV - code coverage report
Current view: top level - monetdb5/modules/kernel - mmath.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 58 96 60.4 %
Date: 2021-10-13 02:24:04 Functions: 34 67 50.7 %

          Line data    Source code
       1             : /*
       2             :  * This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0.  If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       5             :  *
       6             :  * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V.
       7             :  */
       8             : 
       9             : /*
      10             :  * N.J. Nes, M. Kersten
      11             :  * 07/01/1996
      12             :  * The math module
      13             :  * This module contains the math commands. The implementation is very simply,
      14             :  * the c math library functions are called. See for documentation the
      15             :  * ANSI-C/POSIX manuals of the equaly named functions.
      16             :  *
      17             :  * NOTE: the operand itself is being modified, rather than that we produce
      18             :  * a new BAT. This to save the expensive copying.
      19             :  */
      20             : #include "monetdb_config.h"
      21             : #include "mal.h"
      22             : #include "mal_exception.h"
      23             : #include <fenv.h>
      24             : #include "mmath_private.h"
      25             : 
      26             : double
      27           6 : cot(double x)
      28             : {
      29           6 :         return 1.0 / tan(x);
      30             : }
      31             : 
      32             : float
      33           0 : cotf(float x)
      34             : {
      35           0 :         return 1.0f / tanf(x);
      36             : }
      37             : 
      38             : double
      39          44 : radians(double x)
      40             : {
      41          44 :         return x * (M_PI / 180.0);
      42             : }
      43             : 
      44             : float
      45           0 : radiansf(float x)
      46             : {
      47           0 :         return x * (M_PIF / 180.0f);
      48             : }
      49             : 
      50             : double
      51          25 : degrees(double x)
      52             : {
      53          25 :         return x * (180.0 / M_PI);
      54             : }
      55             : 
      56             : float
      57           0 : degreesf(float x)
      58             : {
      59           0 :         return x * (180.0f / M_PIF);
      60             : }
      61             : 
      62             : double
      63           8 : logbs(double base, double x)
      64             : {
      65           8 :         if (base == 1) {
      66           2 :                 feraiseexcept(FE_DIVBYZERO);
      67           2 :                 return INFINITY;
      68             :         }
      69           6 :         return log(x) / log(base);
      70             : }
      71             : 
      72             : float
      73           0 : logbsf(float base, float x)
      74             : {
      75           0 :         if (base == 1) {
      76           0 :                 feraiseexcept(FE_DIVBYZERO);
      77           0 :                 return INFINITY;
      78             :         }
      79           0 :         return logf(x) / logf(base);
      80             : }
      81             : 
      82             : #define unopbaseM5(NAME, FUNC, TYPE)                                                            \
      83             : static str                                                                                                                      \
      84             : MATHunary##NAME##TYPE(TYPE *res, const TYPE *a)                                         \
      85             : {                                                                                                                                       \
      86             :         if (is_##TYPE##_nil(*a)) {                                                                              \
      87             :                 *res = TYPE##_nil;                                                                                      \
      88             :         } else {                                                                                                                \
      89             :                 int e = 0, ex = 0;                                                                                      \
      90             :                 errno = 0;                                                                                                      \
      91             :                 feclearexcept(FE_ALL_EXCEPT);                                                           \
      92             :                 *res = FUNC(*a);                                                                                        \
      93             :                 if ((e = errno) != 0 ||                                                                         \
      94             :                         (ex = fetestexcept(FE_INVALID | FE_DIVBYZERO |                  \
      95             :                                                            FE_OVERFLOW)) != 0) {                                \
      96             :                         const char *err;                                                                                \
      97             :                         if (e) {                                                                                                \
      98             :                                 err = GDKstrerror(e, (char[128]){0}, 128);                      \
      99             :                         } else if (ex & FE_DIVBYZERO)                                                       \
     100             :                                 err = "Divide by zero";                                                               \
     101             :                         else if (ex & FE_OVERFLOW)                                                          \
     102             :                                 err = "Overflow";                                                                     \
     103             :                         else                                                                                                    \
     104             :                                 err = "Invalid result";                                                               \
     105             :                         throw(MAL, "mmath." #FUNC, "Math exception: %s", err);      \
     106             :                 }                                                                                                                       \
     107             :         }                                                                                                                               \
     108             :         return MAL_SUCCEED;                                                                                             \
     109             : }
     110             : 
     111             : #define unopM5(NAME, FUNC)                                              \
     112             :         unopbaseM5(NAME, FUNC, dbl)                                     \
     113             :         unopbaseM5(NAME, FUNC##f, flt)
     114             : 
     115             : #define binopbaseM5(NAME, FUNC, TYPE)                                                           \
     116             : static str                                                                                                                      \
     117             : MATHbinary##NAME##TYPE(TYPE *res, const TYPE *a, const TYPE *b)         \
     118             : {                                                                                                                                       \
     119             :         if (is_##TYPE##_nil(*a) || is_##TYPE##_nil(*b)) {                               \
     120             :                 *res = TYPE##_nil;                                                                                      \
     121             :         } else {                                                                                                                \
     122             :                 int e = 0, ex = 0;                                                                                      \
     123             :                 errno = 0;                                                                                                      \
     124             :                 feclearexcept(FE_ALL_EXCEPT);                                                           \
     125             :                 *res = FUNC(*a, *b);                                                                            \
     126             :                 if ((e = errno) != 0 ||                                                                         \
     127             :                         (ex = fetestexcept(FE_INVALID | FE_DIVBYZERO |                  \
     128             :                                                            FE_OVERFLOW)) != 0) {                                \
     129             :                         const char *err;                                                                                \
     130             :                         if (e) {                                                                                                \
     131             :                                 err = GDKstrerror(e, (char[128]){0}, 128);                      \
     132             :                         } else if (ex & FE_DIVBYZERO)                                                       \
     133             :                                 err = "Divide by zero";                                                               \
     134             :                         else if (ex & FE_OVERFLOW)                                                          \
     135             :                                 err = "Overflow";                                                                     \
     136             :                         else                                                                                                    \
     137             :                                 err = "Invalid result";                                                               \
     138             :                         throw(MAL, "mmath." #FUNC, "Math exception: %s", err);      \
     139             :                 }                                                                                                                       \
     140             :         }                                                                                                                               \
     141             :         return MAL_SUCCEED;                                                                                             \
     142             : }
     143             : 
     144             : #define binopM5(NAME, FUNC)                                             \
     145             :   binopbaseM5(NAME, FUNC, dbl)                                  \
     146             :   binopbaseM5(NAME, FUNC##f, flt)
     147             : 
     148             : #define roundM5(TYPE)                                                                                   \
     149             : static str                                                                                                              \
     150             : MATHbinary_ROUND##TYPE(TYPE *res, const TYPE *x, const int *y)  \
     151             : {                                                                                                                               \
     152             :         if (is_##TYPE##_nil(*x) || is_int_nil(*y)) {                            \
     153             :                 *res = TYPE##_nil;                                                                              \
     154             :         } else {                                                                                                        \
     155             :                 dbl factor = pow(10,*y), integral;                                              \
     156             :                 dbl tmp = *y > 0 ? modf(*x, &integral) : *x;                     \
     157             :                                                                                                                                 \
     158             :                 tmp *= factor;                                                                                  \
     159             :                 if (tmp >= 0)                                                                                        \
     160             :                         tmp = floor(tmp + 0.5);                                                         \
     161             :                 else                                                                                                    \
     162             :                         tmp = ceil(tmp - 0.5);                                                          \
     163             :                 tmp /= factor;                                                                                  \
     164             :                                                                                                                                 \
     165             :                 if (*y > 0)                                                                                          \
     166             :                         tmp += integral;                                                                        \
     167             :                                                                                                                                 \
     168             :                 *res = (TYPE) tmp;                                                                              \
     169             :         }                                                                                                                       \
     170             :         return MAL_SUCCEED;                                                                                     \
     171             : }
     172             : 
     173             : 
     174           2 : unopM5(_ACOS,acos)
     175           3 : unopM5(_ASIN,asin)
     176           2 : unopM5(_ATAN,atan)
     177          22 : unopM5(_COS,cos)
     178       10015 : unopM5(_SIN,sin)
     179           2 : unopM5(_TAN,tan)
     180           4 : unopM5(_COT,cot)
     181          32 : unopM5(_RADIANS,radians)
     182          11 : unopM5(_DEGREES,degrees)
     183             : 
     184           2 : unopM5(_COSH,cosh)
     185           2 : unopM5(_SINH,sinh)
     186           2 : unopM5(_TANH,tanh)
     187             : 
     188           4 : unopM5(_EXP,exp)
     189           3 : unopM5(_LOG,log)
     190           1 : unopM5(_LOG10,log10)
     191           1 : unopM5(_LOG2,log2)
     192           7 : unopM5(_SQRT,sqrt)
     193           4 : unopM5(_CBRT,cbrt)
     194           8 : unopM5(_CEIL,ceil)
     195          13 : unopM5(_FLOOR,floor)
     196             : 
     197           1 : binopM5(_ATAN2,atan2)
     198          15 : binopM5(_POW,pow)
     199           8 : binopM5(_LOG,logbs)
     200             : 
     201             : static str
     202           0 : MATHunary_FABSdbl(dbl *res , const dbl *a)
     203             : {
     204           0 :         *res = is_dbl_nil(*a) ? dbl_nil : fabs(*a);
     205           0 :         return MAL_SUCCEED;
     206             : }
     207             : 
     208           0 : roundM5(dbl)
     209           0 : roundM5(flt)
     210             : 
     211             : static str
     212           0 : MATHunary_ISNAN(bit *res, const dbl *a)
     213             : {
     214           0 :         if (is_dbl_nil(*a)) {
     215           0 :                 *res = bit_nil;
     216             :         } else {
     217           0 :                 *res = isnan(*a) != 0;
     218             :         }
     219           0 :         return MAL_SUCCEED;
     220             : }
     221             : 
     222             : static str
     223           0 : MATHunary_ISINF(int *res, const dbl *a)
     224             : {
     225           0 :         if (is_dbl_nil(*a)) {
     226           0 :                 *res = int_nil;
     227             :         } else {
     228           0 :                 if (isinf(*a)) {
     229           0 :                         *res = (*a < 0.0) ? -1 : 1;
     230             :                 } else {
     231           0 :                         *res = 0;
     232             :                 }
     233             :         }
     234           0 :         return MAL_SUCCEED;
     235             : }
     236             : 
     237             : static str
     238           0 : MATHunary_FINITE(bit *res, const dbl *a)
     239             : {
     240           0 :         if (is_dbl_nil(*a)) {
     241           0 :                 *res = bit_nil;
     242             :         } else {
     243           0 :                 *res = isfinite(*a) != 0;
     244             :         }
     245           0 :         return MAL_SUCCEED;
     246             : }
     247             : 
     248             : /* global pseudo random generator state */
     249             : random_state_engine mmath_rse;
     250             : /* serialize access to state */
     251             : MT_Lock mmath_rse_lock = MT_LOCK_INITIALIZER(mmath_rse_lock);
     252             : 
     253             : static str
     254         266 : MATHprelude(void *ret)
     255             : {
     256             :         (void) ret;
     257         266 :         init_random_state_engine(mmath_rse, (uint64_t) GDKusec());
     258         266 :         return MAL_SUCCEED;
     259             : }
     260             : 
     261             : static str
     262     1010004 : MATHrandint(int *res)
     263             : {
     264             : #ifdef __COVERITY__
     265             :         *res = 0;
     266             : #else
     267     1010004 :         MT_lock_set(&mmath_rse_lock);
     268     1010004 :         *res = (int) (next(mmath_rse) >> 33);
     269     1010004 :         MT_lock_unset(&mmath_rse_lock);
     270             : #endif
     271     1010004 :         return MAL_SUCCEED;
     272             : }
     273             : 
     274             : static str
     275           0 : MATHrandintarg(int *res, const int *dummy)
     276             : {
     277             :         (void) dummy;
     278             : #ifdef __COVERITY__
     279             :         *res = 0;
     280             : #else
     281           0 :         MT_lock_set(&mmath_rse_lock);
     282           0 :         *res = (int) (next(mmath_rse) >> 33);
     283           0 :         MT_lock_unset(&mmath_rse_lock);
     284             : #endif
     285           0 :         return MAL_SUCCEED;
     286             : }
     287             : 
     288             : static str
     289           4 : MATHsrandint(void *ret, const int *seed)
     290             : {
     291             :         (void) ret;
     292           4 :         MT_lock_set(&mmath_rse_lock);
     293           4 :         init_random_state_engine(mmath_rse, (uint64_t) *seed);
     294           4 :         MT_lock_unset(&mmath_rse_lock);
     295           4 :         return MAL_SUCCEED;
     296             : }
     297             : 
     298             : static str
     299           5 : MATHsqlrandint(int *res, const int *seed)
     300             : {
     301             : #ifdef __COVERITY__
     302             :         (void) seed;
     303             :         *res = 0;
     304             : #else
     305           5 :         MT_lock_set(&mmath_rse_lock);
     306           5 :         init_random_state_engine(mmath_rse, (uint64_t) *seed);
     307           5 :         *res = (int) (next(mmath_rse) >> 33);
     308           5 :         MT_lock_unset(&mmath_rse_lock);
     309             : #endif
     310           5 :         return MAL_SUCCEED;
     311             : }
     312             : 
     313             : static str
     314          72 : MATHpi(dbl *pi)
     315             : {
     316          72 :         *pi = M_PI;
     317          72 :         return MAL_SUCCEED;
     318             : }
     319             : 
     320             : #include "mel.h"
     321             : mel_func mmath_init_funcs[] = {
     322             :  command("mmath", "acos", MATHunary_ACOSflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     323             :  command("mmath", "acos", MATHunary_ACOSdbl, false, "The acos(x) function calculates the arc cosine of x, that is the \nvalue whose cosine is x. The value is returned in radians and is \nmathematically defined to be between 0 and PI (inclusive).", args(1,2, arg("",dbl),arg("x",dbl))),
     324             :  command("mmath", "asin", MATHunary_ASINflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     325             :  command("mmath", "asin", MATHunary_ASINdbl, false, "The asin(x) function calculates the arc sine of x, that is the value \nwhose sine is x. The value is returned in radians and is mathematically \ndefined to be between -PI/20 and -PI/2 (inclusive).", args(1,2, arg("",dbl),arg("x",dbl))),
     326             :  command("mmath", "atan", MATHunary_ATANflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     327             :  command("mmath", "atan", MATHunary_ATANdbl, false, "The atan(x) function calculates the arc tangent of x, that is the value \nwhose tangent is x. The value is returned in radians and is mathematically \ndefined to be between -PI/2 and PI/2 (inclusive).", args(1,2, arg("",dbl),arg("x",dbl))),
     328             :  command("mmath", "atan2", MATHbinary_ATAN2flt, false, "", args(1,3, arg("",flt),arg("x",flt),arg("y",flt))),
     329             :  command("mmath", "atan2", MATHbinary_ATAN2dbl, false, "The atan2(x,y) function calculates the arc tangent of the two \nvariables x and y.  It is similar to calculating the arc\ntangent of y / x, except that the signs of both arguments are \nused to determine the quadrant of the result.  The value is \nreturned in radians and is mathematically defined to be between \n-PI/2 and PI/2 (inclusive).", args(1,3, arg("",dbl),arg("x",dbl),arg("y",dbl))),
     330             :  command("mmath", "cos", MATHunary_COSflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     331             :  command("mmath", "cos", MATHunary_COSdbl, false, "The cos(x) function returns the cosine of x, where x is given in \nradians. The return value is between -1 and 1.", args(1,2, arg("",dbl),arg("x",dbl))),
     332             :  command("mmath", "sin", MATHunary_SINflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     333             :  command("mmath", "sin", MATHunary_SINdbl, false, "The sin(x) function returns the cosine of x, where x is given in \nradians. The return value is between -1 and 1.", args(1,2, arg("",dbl),arg("x",dbl))),
     334             :  command("mmath", "tan", MATHunary_TANflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     335             :  command("mmath", "tan", MATHunary_TANdbl, false, "The tan(x) function returns the tangent of x,\nwhere x is given in radians", args(1,2, arg("",dbl),arg("x",dbl))),
     336             :  command("mmath", "cot", MATHunary_COTflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     337             :  command("mmath", "cot", MATHunary_COTdbl, false, "The cot(x) function returns the Cotangent of x,\nwhere x is given in radians", args(1,2, arg("",dbl),arg("x",dbl))),
     338             :  command("mmath", "cosh", MATHunary_COSHflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     339             :  command("mmath", "cosh", MATHunary_COSHdbl, false, "The cosh() function  returns the hyperbolic cosine of x, which is \ndefined mathematically as (exp(x) + exp(-x)) / 2.", args(1,2, arg("",dbl),arg("x",dbl))),
     340             :  command("mmath", "sinh", MATHunary_SINHflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     341             :  command("mmath", "sinh", MATHunary_SINHdbl, false, "The sinh() function  returns  the  hyperbolic sine of x, which \nis defined mathematically as (exp(x) - exp(-x)) / 2.", args(1,2, arg("",dbl),arg("x",dbl))),
     342             :  command("mmath", "tanh", MATHunary_TANHflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     343             :  command("mmath", "tanh", MATHunary_TANHdbl, false, "The tanh() function returns the hyperbolic tangent of x, which is \ndefined mathematically as sinh(x) / cosh(x).", args(1,2, arg("",dbl),arg("x",dbl))),
     344             :  command("mmath", "radians", MATHunary_RADIANSflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     345             :  command("mmath", "radians", MATHunary_RADIANSdbl, false, "The radians() function converts degrees into radians", args(1,2, arg("",dbl),arg("x",dbl))),
     346             :  command("mmath", "degrees", MATHunary_DEGREESflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     347             :  command("mmath", "degrees", MATHunary_DEGREESdbl, false, "The degrees() function converts radians into degrees", args(1,2, arg("",dbl),arg("x",dbl))),
     348             :  command("mmath", "exp", MATHunary_EXPflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     349             :  command("mmath", "exp", MATHunary_EXPdbl, false, "The exp(x) function returns the value of e (the base of \nnatural logarithms) raised to the power of x.", args(1,2, arg("",dbl),arg("x",dbl))),
     350             :  command("mmath", "log", MATHunary_LOGflt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     351             :  command("mmath", "log", MATHunary_LOGdbl, false, "The log(x) function returns the natural logarithm of x.", args(1,2, arg("",dbl),arg("x",dbl))),
     352             :  command("mmath", "log2arg", MATHbinary_LOGflt, false, "The log(x) function returns the logarithm of x in the given base.", args(1,3, arg("",flt),arg("x",flt),arg("base",flt))),
     353             :  command("mmath", "log2arg", MATHbinary_LOGdbl, false, "The log(x) function returns the logarithm of x in the given base.", args(1,3, arg("",dbl),arg("x",dbl),arg("base",dbl))),
     354             :  command("mmath", "log10", MATHunary_LOG10flt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     355             :  command("mmath", "log10", MATHunary_LOG10dbl, false, "The log10(x) function returns the base-10 logarithm of x.", args(1,2, arg("",dbl),arg("x",dbl))),
     356             :  command("mmath", "log2", MATHunary_LOG2flt, false, "", args(1,2, arg("",flt),arg("x",flt))),
     357             :  command("mmath", "log2", MATHunary_LOG2dbl, false, "The log2(x) function returns the base-2 logarithm of x.", args(1,2, arg("",dbl),arg("x",dbl))),
     358             :  command("mmath", "pow", MATHbinary_POWflt, false, "", args(1,3, arg("",flt),arg("x",flt),arg("y",flt))),
     359             :  command("mmath", "pow", MATHbinary_POWdbl, false, "The pow(x,y) function  returns the value of x raised to the power of y.", args(1,3, arg("",dbl),arg("x",dbl),arg("y",dbl))),
     360             :  command("mmath", "sqrt", MATHunary_SQRTflt, false, "", args(1,2, arg("",flt),arg("y",flt))),
     361             :  command("mmath", "sqrt", MATHunary_SQRTdbl, false, "The sqrt(x) function returns the non-negative root of x.", args(1,2, arg("",dbl),arg("y",dbl))),
     362             :  command("mmath", "cbrt", MATHunary_CBRTflt, false, "", args(1,2, arg("",flt),arg("y",flt))),
     363             :  command("mmath", "cbrt", MATHunary_CBRTdbl, false, "The cbrt(x) function returns the cube root of x.", args(1,2, arg("",dbl),arg("y",dbl))),
     364             :  command("mmath", "ceil", MATHunary_CEILflt, false, "", args(1,2, arg("",flt),arg("y",flt))),
     365             :  command("mmath", "ceil", MATHunary_CEILdbl, false, "The ceil(x) function rounds x upwards to the nearest integer.", args(1,2, arg("",dbl),arg("y",dbl))),
     366             :  command("mmath", "fabs", MATHunary_FABSdbl, false, "The fabs(x) function  returns  the  absolute value of the \nfloating-point number x.", args(1,2, arg("",dbl),arg("y",dbl))),
     367             :  command("mmath", "floor", MATHunary_FLOORflt, false, "", args(1,2, arg("",flt),arg("y",flt))),
     368             :  command("mmath", "floor", MATHunary_FLOORdbl, false, "The floor(x) function rounds x downwards to the nearest integer.", args(1,2, arg("",dbl),arg("y",dbl))),
     369             :  command("mmath", "round", MATHbinary_ROUNDflt, false, "", args(1,3, arg("",flt),arg("x",flt),arg("y",int))),
     370             :  command("mmath", "round", MATHbinary_ROUNDdbl, false, "The round(n, m) returns n rounded to m places to the right \nof the decimal point; if m is omitted, to 0 places. m can be \nnegative to round off digits left of the decimal point. \nm must be an integer.", args(1,3, arg("",dbl),arg("x",dbl),arg("y",int))),
     371             :  command("mmath", "isnan", MATHunary_ISNAN, false, "The isnan(x) function returns true if x is 'not-a-number' \n(NaN), and false otherwise.", args(1,2, arg("",bit),arg("d",dbl))),
     372             :  command("mmath", "isinf", MATHunary_ISINF, false, "The isinf(x) function returns -1 if x represents negative \ninfinity, 1 if x represents positive infinity, and 0 otherwise.", args(1,2, arg("",int),arg("d",dbl))),
     373             :  command("mmath", "finite", MATHunary_FINITE, false, "The finite(x) function returns true if x is neither infinite \nnor a 'not-a-number' (NaN) value, and false otherwise.", args(1,2, arg("",bit),arg("d",dbl))),
     374             :  command("mmath", "rand", MATHrandint, true, "return a random number", args(1,1, arg("",int))),
     375             :  command("mmath", "rand", MATHrandintarg, true, "return a random number", args(1,2, arg("",int),arg("v",int))),
     376             :  command("mmath", "srand", MATHsrandint, false, "initialize the rand() function with a seed", args(1,2, arg("",void),arg("seed",int))),
     377             :  command("mmath", "sqlrand", MATHsqlrandint, false, "initialize the rand() function with a seed and call rand()", args(1,2, arg("",int),arg("seed",int))),
     378             :  command("mmath", "pi", MATHpi, false, "return an important mathematical value", args(1,1, arg("",dbl))),
     379             :  command("mmath", "prelude", MATHprelude, false, "initilize mmath module", args(1,1, arg("",void))),
     380             :  { .imp=NULL }
     381             : };
     382             : #include "mal_import.h"
     383             : #ifdef _MSC_VER
     384             : #undef read
     385             : #pragma section(".CRT$XCU",read)
     386             : #endif
     387         259 : LIB_STARTUP_FUNC(init_mmath_mal)
     388         259 : { mal_module("mmath", NULL, mmath_init_funcs); }

Generated by: LCOV version 1.14