summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/cscd')
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c12
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c17
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c15
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c11
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c10
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c12
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c17
8 files changed, 104 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c
new file mode 100644
index 00000000..d18d3c71
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c
@@ -0,0 +1,12 @@
+#include "csc.h"
+#include "cscd.h"
+#include <math.h>
+
+void ccscda(floatComplex* in, int size,floatComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = ccscds(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c
new file mode 100644
index 00000000..8f1f9f75
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c
@@ -0,0 +1,17 @@
+#include <math.h>
+#include "sin.h"
+#include "cos.h"
+#include "sinh.h"
+#include "cosh.h"
+#include "csc.h"
+#include "cscd.h"
+#include "floatComplex.h"
+#include "division.h"
+
+floatComplex ccscds(floatComplex z)
+{
+
+ floatComplex out;
+ out = crdivs(FloatComplex(1,0),csins(z));
+ return out;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c
new file mode 100644
index 00000000..43e00430
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c
@@ -0,0 +1,15 @@
+#include "cscd.h"
+#include <math.h>
+#define PI 3.14159265
+
+void dcscda(double* in,int size,double* out)
+{
+ double val;
+ int i=0;
+ val = PI / 180.0;
+ for(i=0;i<size;i++)
+ {
+ out[i]=1/sin(in[i]*val);
+ }
+}
+
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c
new file mode 100644
index 00000000..d9a0df9a
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c
@@ -0,0 +1,11 @@
+#include "cscd.h"
+#include <math.h>
+
+double dcscds(double in)
+{
+ double val;
+ val = (M_PI) / 180.0;
+ double out;
+ out=1/sin(in*val);
+ return out;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c
new file mode 100644
index 00000000..761d9413
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c
@@ -0,0 +1,10 @@
+#include "cscd.h"
+
+void scscda(float* in,int size,float* out)
+{
+ int i = 0;
+ for (i = 0;i<size;++i)
+ {
+ out[i] = scscds(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c
new file mode 100644
index 00000000..d4348549
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c
@@ -0,0 +1,10 @@
+#include "cscd.h"
+#include <math.h>
+
+float scscds(float in)
+{
+ float out,val;
+ val=(M_PI)/180.0;
+ out=1/sin(in*val);
+ return out;
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c
new file mode 100644
index 00000000..02f9e3b2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c
@@ -0,0 +1,12 @@
+#include "csc.h"
+#include "cscd.h"
+#include <math.h>
+
+void zcscda(doubleComplex* in, int size,doubleComplex* out)
+{
+ int i = 0;
+ for (i=0;i<size;i++)
+ {
+ out[i] = zcscds(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c
new file mode 100644
index 00000000..351c8ff2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c
@@ -0,0 +1,17 @@
+#include <math.h>
+#include "sin.h"
+#include "cos.h"
+#include "sinh.h"
+#include "cosh.h"
+#include "csc.h"
+#include "cscd.h"
+#include "doubleComplex.h"
+#include "division.h"
+
+doubleComplex zcscds(doubleComplex z)
+{
+
+ doubleComplex out;
+ out = zrdivs(DoubleComplex(1,0),zsins(z));
+ return out;
+}