| 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 - 2019 MonetDB B.V. |
| 7 | */ |
| 8 | |
| 9 | #ifndef __MMATH_H__ |
| 10 | #define __MMATH_H__ |
| 11 | #include "mal.h" |
| 12 | #include "mal_exception.h" |
| 13 | |
| 14 | #define unopbaseM5_export(X1,X2)\ |
| 15 | mal_export str MATHunary##X1##X2(X2 *res, const X2 *a); |
| 16 | |
| 17 | #define unopM5_export(X1)\ |
| 18 | unopbaseM5_export(X1,dbl)\ |
| 19 | unopbaseM5_export(X1,flt) |
| 20 | |
| 21 | #define binopbaseM5_export(X1,X2,X3)\ |
| 22 | mal_export str MATHbinary##X1##X2(X2 *res, const X2 *a, const X3 *b); |
| 23 | |
| 24 | #define binopM5_export(X1)\ |
| 25 | binopbaseM5_export(X1,dbl,dbl)\ |
| 26 | binopbaseM5_export(X1,flt,flt) |
| 27 | |
| 28 | unopM5_export(_ACOS) |
| 29 | unopM5_export(_ASIN) |
| 30 | unopM5_export(_ATAN) |
| 31 | binopM5_export(_ATAN2) |
| 32 | unopM5_export(_COS) |
| 33 | unopM5_export(_SIN) |
| 34 | unopM5_export(_TAN) |
| 35 | unopM5_export(_COT) |
| 36 | |
| 37 | unopM5_export(_COSH) |
| 38 | unopM5_export(_SINH) |
| 39 | unopM5_export(_TANH) |
| 40 | unopM5_export(_RADIANS) |
| 41 | unopM5_export(_DEGREES) |
| 42 | |
| 43 | unopM5_export(_EXP) |
| 44 | unopM5_export(_LOG) |
| 45 | unopM5_export(_LOG10) |
| 46 | unopM5_export(_LOG2) |
| 47 | binopM5_export(_LOG) |
| 48 | |
| 49 | binopM5_export(_POW) |
| 50 | unopM5_export(_SQRT) |
| 51 | unopM5_export(_CBRT) |
| 52 | |
| 53 | unopM5_export(_CEIL) |
| 54 | unopbaseM5_export(_FABS,dbl) |
| 55 | unopM5_export(_FLOOR) |
| 56 | binopbaseM5_export(_ROUND,dbl,int) |
| 57 | binopbaseM5_export(_ROUND,flt,int) |
| 58 | |
| 59 | mal_export str MATHunary_ISNAN(bit *res, const dbl *a); |
| 60 | mal_export str MATHunary_ISINF(int *res, const dbl *a); |
| 61 | mal_export str MATHunary_FINITE(bit *res, const dbl *a); |
| 62 | mal_export str MATHrandint(int *res); |
| 63 | mal_export str MATHrandintarg(int *res, const int *dummy); |
| 64 | mal_export str MATHsrandint(void *ret, const int *seed); |
| 65 | mal_export str MATHsqlrandint(int *res, const int *seed); |
| 66 | mal_export str MATHpi(dbl *pi); |
| 67 | mal_export str MATHprelude(void *ret); |
| 68 | |
| 69 | #endif /* __MMATH_H__ */ |
| 70 | |