summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/Trigonometry/sech
diff options
context:
space:
mode:
authorsiddhu89902017-04-19 14:57:49 +0530
committersiddhu89902017-04-19 14:57:49 +0530
commit1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f (patch)
tree34e52b33707a829c1d8484428c96d3f1f6ce2b3a /src/c/elementaryFunctions/Trigonometry/sech
parent9e506f48291533cba7b4c555b0d2e98f234bfbe3 (diff)
downloadScilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.gz
Scilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.bz2
Scilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.zip
Merged Shamik's work
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry/sech')
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/csecha.c11
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/csechs.c15
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/dsecha.c10
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/dsechs.c10
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/ssecha.c10
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/ssechs.c10
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/zsecha.c11
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sech/zsechs.c15
8 files changed, 92 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/sech/csecha.c b/src/c/elementaryFunctions/Trigonometry/sech/csecha.c
new file mode 100644
index 0000000..dcd76d5
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/csechs.c b/src/c/elementaryFunctions/Trigonometry/sech/csechs.c
new file mode 100644
index 0000000..37ba6d9
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c b/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c
new file mode 100644
index 0000000..cfab81f
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c b/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c
new file mode 100644
index 0000000..10ca392
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c b/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c
new file mode 100644
index 0000000..1d26563
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c b/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c
new file mode 100644
index 0000000..f582fd7
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c b/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c
new file mode 100644
index 0000000..c48f8da
--- /dev/null
+++ b/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/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c b/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c
new file mode 100644
index 0000000..93c95b3
--- /dev/null
+++ b/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;
+}