summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/acoth
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/acoth')
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/cacotha.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/cacoths.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/dacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/dacoths.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/sacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/sacoths.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/zacotha.c21
-rw-r--r--2.3-1/src/c/elementaryFunctions/acoth/zacoths.c23
8 files changed, 170 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c
new file mode 100644
index 00000000..f4e72dc6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/cacotha.c
@@ -0,0 +1,22 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "floatComplex.h"
+
+void cacotha(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = cacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c
new file mode 100644
index 00000000..658c227a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/cacoths.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "division.h"
+#include "floatComplex.h"
+#include "atanh.h"
+
+floatComplex cacoths(floatComplex x)
+{
+ floatComplex xinv;
+ xinv = crdivs(FloatComplex(1,0),x);
+ return catanhs(xinv);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c
new file mode 100644
index 00000000..b97b9039
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/dacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+
+void dacotha(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c
new file mode 100644
index 00000000..aa20a7bd
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/dacoths.c
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "log.h"
+
+
+double dacoths(double x)
+{
+ return (log((1+x)/(x-1))/2);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c
new file mode 100644
index 00000000..383f1882
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/sacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+
+void sacotha(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c
new file mode 100644
index 00000000..9a2137a6
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/sacoths.c
@@ -0,0 +1,19 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "log.h"
+
+float sacoths(float x)
+{
+ return (log((1+x)/(x-1))/2);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c b/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c
new file mode 100644
index 00000000..3eb335ea
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/zacotha.c
@@ -0,0 +1,21 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include "acoth.h"
+#include "doubleComplex.h"
+
+void zacotha(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = zacoths(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c b/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c
new file mode 100644
index 00000000..bbb387b0
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/acoth/zacoths.c
@@ -0,0 +1,23 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Organization: FOSSEE, IIT Bombay
+// Author: Ashish Kamble
+// Email: toolbox@scilab.in
+
+#include <math.h>
+#include "acoth.h"
+#include "division.h"
+#include "doubleComplex.h"
+#include "atanh.h"
+
+doubleComplex zacoths(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zatanhs(xinv);
+}