summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/Trigonometry/sech
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/sech')
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c11
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c15
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c11
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c15
8 files changed, 92 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c
new file mode 100644
index 00000000..dcd76d59
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c
@@ -0,0 +1,11 @@
+#include "sech.h"
+#include <math.h>
+
+void csecha(floatComplex* in, int size,floatComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = csechs(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c
new file mode 100644
index 00000000..37ba6d95
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c
@@ -0,0 +1,15 @@
+#include "sech.h"
+#include "sec.h"
+#include <math.h>
+#include "cos.h"
+#include "cosh.h"
+#include "floatComplex.h"
+#include "division.h"
+
+floatComplex csechs(floatComplex z)
+{
+
+ floatComplex out;
+ out = crdivs(FloatComplex(1,0),ccoshs(z));
+ return out;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c
new file mode 100644
index 00000000..cfab81ff
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c
@@ -0,0 +1,10 @@
+#include "sech.h"
+#include <math.h>
+void dsecha(double* in,int size,double* out)
+{
+ int i=0;
+ for(i=0;i<size;i++)
+ {
+ out[i]=dsechs(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c
new file mode 100644
index 00000000..10ca392a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c
@@ -0,0 +1,10 @@
+#include <math.h>
+#include "sech.h"
+#include "cosh.h"
+#include "cos.h"
+
+
+double dsechs(double in)
+{
+ return (1/cosh(in));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c
new file mode 100644
index 00000000..1d265639
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c
@@ -0,0 +1,10 @@
+#include "sech.h"
+#include <math.h>
+void ssecha(float* in,int size,float* out)
+{
+ int i=0;
+ for(i=0;i<size;i++)
+ {
+ out[i]=ssechs(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c
new file mode 100644
index 00000000..f582fd79
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c
@@ -0,0 +1,10 @@
+#include <math.h>
+#include "sech.h"
+#include "cosh.h"
+#include "cos.h"
+
+
+float ssechs(float in)
+{
+ return (1/cosh(in));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c
new file mode 100644
index 00000000..c48f8dab
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c
@@ -0,0 +1,11 @@
+#include "sech.h"
+#include <math.h>
+
+void zsecha(doubleComplex* in, int size,doubleComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = zsechs(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c
new file mode 100644
index 00000000..93c95b3f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c
@@ -0,0 +1,15 @@
+#include "sech.h"
+#include "sec.h"
+#include <math.h>
+#include "cos.h"
+#include "cosh.h"
+#include "doubleComplex.h"
+#include "division.h"
+
+doubleComplex zsechs(doubleComplex z)
+{
+
+ doubleComplex out;
+ out = zrdivs(DoubleComplex(1,0),zcoshs(z));
+ return out;
+}