summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/Trigonometry/coth
diff options
context:
space:
mode:
authorAnkit Raj2017-06-21 10:26:59 +0530
committerAnkit Raj2017-06-21 10:26:59 +0530
commita555820564d9f2e95ca8c97871339d3a5a2081c3 (patch)
treeadb074b66a8e6750209880e6932305ce0a94c8bf /2.3-1/src/c/elementaryFunctions/Trigonometry/coth
downloadScilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.tar.gz
Scilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.tar.bz2
Scilab2C-a555820564d9f2e95ca8c97871339d3a5a2081c3.zip
Updated Scilab2C
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/coth')
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c24
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c26
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c24
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c25
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c22
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c23
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c26
8 files changed, 192 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c
new file mode 100644
index 00000000..44a366e8
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "coth.h"
+#include <math.h>
+
+void ccotha(floatComplex* in, int size,floatComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = ccoths(in[i]);
+ }
+
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c
new file mode 100644
index 00000000..b7f90263
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "coth.h"
+#include <math.h>
+#include "tanh.h"
+#include "floatComplex.h"
+#include "division.h"
+
+floatComplex ccoths(floatComplex z)
+{
+
+ floatComplex out;
+ out = crdivs(FloatComplex(1,0), ctanhs(z));
+ return out;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c
new file mode 100644
index 00000000..bb54b200
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "coth.h"
+#include <math.h>
+
+void dcotha(double* in,int size,double* out)
+{
+ int i=0;
+ for(i=0;i<size;i++)
+ {
+ out[i]=cosh(in[i])/sinh(in[i]);
+ }
+}
+
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c
new file mode 100644
index 00000000..55c9a5b4
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "coth.h"
+#include "cosh.h"
+#include "cos.h"
+#include "sinh.h"
+#include "sin.h"
+
+double dcoths(double in) {
+ return (cosh(in)/sinh(in));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c
new file mode 100644
index 00000000..53351621
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "coth.h"
+#include <math.h>
+
+void scotha(float* in,int size,float* out)
+{
+ float val;
+ int i=0;
+ for(i=0;i<size;i++)
+ {
+ out[i]=cosh(in[i])/sinh(in[i]);
+ }
+}
+
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c
new file mode 100644
index 00000000..2865f566
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "coth.h"
+#include "cosh.h"
+#include "cos.h"
+#include "sinh.h"
+#include "sin.h"
+
+float scoths(float in) {
+ return (cosh(in)/sinh(in));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c
new file mode 100644
index 00000000..206cc43f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "coth.h"
+#include <math.h>
+
+void zcotha(doubleComplex* in, int size,doubleComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = zcoths(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c
new file mode 100644
index 00000000..8b3b19f5
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 2016 - 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
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "coth.h"
+#include "tanh.h"
+#include "tan.h"
+#include <math.h>
+#include "doubleComplex.h"
+#include "division.h"
+
+doubleComplex zcoths(doubleComplex z)
+{
+
+ doubleComplex out;
+ out = zrdivs(DoubleComplex(1,0),ztanhs(z));
+ return out;
+}