Changeset: 294c0920c1bb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=294c0920c1bb
Branch: default
Log Message:
Merged heads
diffs (112 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -5356,6 +5356,10 @@ stdout of test 'MAL-signatures` in direc
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_cosh;", "" ]
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:flt]):bat[:flt] ",
"CMDscience_bat_cosh;", "" ]
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:flt],
X_2:bat[:oid]):bat[:flt] ", "CMDscience_bat_cosh;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:dbl]):bat[:dbl] ",
"CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:flt]):bat[:flt] ",
"CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:flt],
X_2:bat[:oid]):bat[:flt] ", "CMDscience_bat_cot;", "" ]
[ "batmmath", "degrees", "pattern
batmmath.degrees(X_1:bat[:dbl]):bat[:dbl] ", "CMDscience_bat_degrees;",
"" ]
[ "batmmath", "degrees", "pattern batmmath.degrees(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_degrees;", "" ]
[ "batmmath", "degrees", "pattern
batmmath.degrees(X_1:bat[:flt]):bat[:flt] ", "CMDscience_bat_degrees;",
"" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -7680,6 +7680,10 @@ stdout of test 'MAL-signatures` in direc
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_cosh;", "" ]
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:flt]):bat[:flt] ",
"CMDscience_bat_cosh;", "" ]
[ "batmmath", "cosh", "pattern batmmath.cosh(X_1:bat[:flt],
X_2:bat[:oid]):bat[:flt] ", "CMDscience_bat_cosh;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:dbl]):bat[:dbl] ",
"CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:flt]):bat[:flt] ",
"CMDscience_bat_cot;", "" ]
+[ "batmmath", "cot", "pattern batmmath.cot(X_1:bat[:flt],
X_2:bat[:oid]):bat[:flt] ", "CMDscience_bat_cot;", "" ]
[ "batmmath", "degrees", "pattern
batmmath.degrees(X_1:bat[:dbl]):bat[:dbl] ", "CMDscience_bat_degrees;",
"" ]
[ "batmmath", "degrees", "pattern batmmath.degrees(X_1:bat[:dbl],
X_2:bat[:oid]):bat[:dbl] ", "CMDscience_bat_degrees;", "" ]
[ "batmmath", "degrees", "pattern
batmmath.degrees(X_1:bat[:flt]):bat[:flt] ", "CMDscience_bat_degrees;",
"" ]
diff --git a/monetdb5/modules/kernel/batmmath.c
b/monetdb5/modules/kernel/batmmath.c
--- a/monetdb5/modules/kernel/batmmath.c
+++ b/monetdb5/modules/kernel/batmmath.c
@@ -379,6 +379,18 @@ CMDscience_bat_##FUNC(Client cntxt, MalB
}
static double
+cot(double x)
+{
+ return (1/tan(x));
+}
+
+static float
+cotf(float x)
+{
+ return (1/tan(x));
+}
+
+static double
radians(double x)
{
return x * (M_PI / 180.0);
@@ -402,12 +414,13 @@ degreesf(float x)
return (float) (x * (180.0 / M_PI));
}
+scienceImpl(acos)
scienceImpl(asin)
-scienceImpl(acos)
scienceImpl(atan)
scienceImpl(cos)
scienceImpl(sin)
scienceImpl(tan)
+scienceImpl(cot)
scienceImpl(cosh)
scienceImpl(sinh)
scienceImpl(tanh)
@@ -457,6 +470,10 @@ mel_func batmmath_init_funcs[] = {
pattern("batmmath", "tan", CMDscience_bat_tan, false, "", args(1,3,
batarg("",dbl),batarg("x",dbl),batarg("s",oid))),
pattern("batmmath", "tan", CMDscience_bat_tan, false, "", args(1,2,
batarg("",flt),batarg("x",flt))),
pattern("batmmath", "tan", CMDscience_bat_tan, false, "", args(1,3,
batarg("",flt),batarg("x",flt),batarg("s",oid))),
+ pattern("batmmath", "cot", CMDscience_bat_cot, false, "", args(1,2,
batarg("",dbl),batarg("x",dbl))),
+ pattern("batmmath", "cot", CMDscience_bat_cot, false, "", args(1,3,
batarg("",dbl),batarg("x",dbl),batarg("s",oid))),
+ pattern("batmmath", "cot", CMDscience_bat_cot, false, "", args(1,2,
batarg("",flt),batarg("x",flt))),
+ pattern("batmmath", "cot", CMDscience_bat_cot, false, "", args(1,3,
batarg("",flt),batarg("x",flt),batarg("s",oid))),
pattern("batmmath", "cosh", CMDscience_bat_cosh, false, "", args(1,2,
batarg("",dbl),batarg("x",dbl))),
pattern("batmmath", "cosh", CMDscience_bat_cosh, false, "", args(1,3,
batarg("",dbl),batarg("x",dbl),batarg("s",oid))),
pattern("batmmath", "cosh", CMDscience_bat_cosh, false, "", args(1,2,
batarg("",flt),batarg("x",flt))),
diff --git a/monetdb5/modules/kernel/mmath.c b/monetdb5/modules/kernel/mmath.c
--- a/monetdb5/modules/kernel/mmath.c
+++ b/monetdb5/modules/kernel/mmath.c
@@ -154,7 +154,6 @@ MATHbinary_ROUND##TYPE(TYPE *res, const
unopM5(_ACOS,acos)
unopM5(_ASIN,asin)
unopM5(_ATAN,atan)
-binopM5(_ATAN2,atan2)
unopM5(_COS,cos)
unopM5(_SIN,sin)
unopM5(_TAN,tan)
@@ -170,11 +169,9 @@ unopM5(_EXP,exp)
unopM5(_LOG,log)
unopM5(_LOG10,log10)
unopM5(_LOG2,log2)
-
-binopM5(_LOG,logbs)
+unopM5(_SQRT,sqrt)
-binopM5(_POW,pow)
-unopM5(_SQRT,sqrt)
+
#ifdef HAVE_CBRT
unopM5(_CBRT,cbrt)
#else
@@ -184,6 +181,10 @@ unopM5NOT(_CBRT,cbrt)
unopM5(_CEIL,ceil)
unopM5(_FLOOR,floor)
+binopM5(_ATAN2,atan2)
+binopM5(_POW,pow)
+binopM5(_LOG,logbs)
+
static str
MATHunary_FABSdbl(dbl *res , const dbl *a)
{
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list