summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/acsch
diff options
context:
space:
mode:
authorsiddhu89902017-04-19 14:28:34 +0530
committersiddhu89902017-04-19 14:28:34 +0530
commit9e506f48291533cba7b4c555b0d2e98f234bfbe3 (patch)
tree6ffe38eefea51cdb767493850b2ada0c098fe416 /src/c/elementaryFunctions/acsch
parent453598b49cb3d4a62b1797dbc90f0e3dd4521329 (diff)
downloadScilab2C_fossee_old-9e506f48291533cba7b4c555b0d2e98f234bfbe3.tar.gz
Scilab2C_fossee_old-9e506f48291533cba7b4c555b0d2e98f234bfbe3.tar.bz2
Scilab2C_fossee_old-9e506f48291533cba7b4c555b0d2e98f234bfbe3.zip
Merged Ashish's work
Diffstat (limited to 'src/c/elementaryFunctions/acsch')
-rw-r--r--src/c/elementaryFunctions/acsch/cacscha.c22
-rw-r--r--src/c/elementaryFunctions/acsch/cacschs.c30
-rw-r--r--src/c/elementaryFunctions/acsch/dacscha.c21
-rw-r--r--src/c/elementaryFunctions/acsch/dacschs.c17
-rw-r--r--src/c/elementaryFunctions/acsch/sacscha.c21
-rw-r--r--src/c/elementaryFunctions/acsch/sacschs.c17
-rw-r--r--src/c/elementaryFunctions/acsch/zacscha.c22
-rw-r--r--src/c/elementaryFunctions/acsch/zacschs.c22
8 files changed, 172 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/acsch/cacscha.c b/src/c/elementaryFunctions/acsch/cacscha.c
new file mode 100644
index 0000000..0512a20
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/cacscha.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 <math.h>
+#include "acsc.h"
+#include "floatComplex.h"
+
+void cacsca(floatComplex* x, int size, floatComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = cacscs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/acsch/cacschs.c b/src/c/elementaryFunctions/acsch/cacschs.c
new file mode 100644
index 0000000..a250b9d
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/cacschs.c
@@ -0,0 +1,30 @@
+// 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 "acsch.h"
+#include "floatComplex.h"
+#include "asin.h"
+#include "division.h"
+
+floatComplex cacschs(floatComplex x)
+{
+ floatComplex xinv;
+ floatComplex temp;
+ xinv = crdivs(FloatComplex(1,0),x);
+ temp = sqrt(1+cmuls(xinv*xinv))
+
+}
+
+
+
+
+
+log(sqrt(1+(1/(x*x)))+(1/x));
diff --git a/src/c/elementaryFunctions/acsch/dacscha.c b/src/c/elementaryFunctions/acsch/dacscha.c
new file mode 100644
index 0000000..e717710
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/dacscha.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 <math.h>
+#include "acsch.h"
+
+void dacscha(double* x, int size, double* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = dacschs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/acsch/dacschs.c b/src/c/elementaryFunctions/acsch/dacschs.c
new file mode 100644
index 0000000..b0a3229
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/dacschs.c
@@ -0,0 +1,17 @@
+// 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 "acsch.h"
+
+double dacschs(double x)
+{
+ return log(sqrt(1+(1/(x*x)))+(1/x));
+}
diff --git a/src/c/elementaryFunctions/acsch/sacscha.c b/src/c/elementaryFunctions/acsch/sacscha.c
new file mode 100644
index 0000000..c2321c6
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/sacscha.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 <math.h>
+#include "acsch.h"
+
+void sacscha(float* x, int size, float* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = sacschs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/acsch/sacschs.c b/src/c/elementaryFunctions/acsch/sacschs.c
new file mode 100644
index 0000000..031773b
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/sacschs.c
@@ -0,0 +1,17 @@
+// 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 "acsch.h"
+
+double sacschs(float x)
+{
+ return log(sqrt(1+(1/(x*x)))+(1/x));
+}
diff --git a/src/c/elementaryFunctions/acsch/zacscha.c b/src/c/elementaryFunctions/acsch/zacscha.c
new file mode 100644
index 0000000..164406f
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/zacscha.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 <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+
+void zacsca(doubleComplex* x, int size, doubleComplex* y)
+{
+ int i = 0;
+ for (i = 0; i < size; ++i)
+ {
+ y[i] = zacscs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/acsch/zacschs.c b/src/c/elementaryFunctions/acsch/zacschs.c
new file mode 100644
index 0000000..6e33e25
--- /dev/null
+++ b/src/c/elementaryFunctions/acsch/zacschs.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 <math.h>
+#include "acsc.h"
+#include "doubleComplex.h"
+#include "division.h"
+#include "asin.h"
+
+doubleComplex zacscs(doubleComplex x)
+{
+ doubleComplex xinv;
+ xinv = zrdivs(DoubleComplex(1,0),x);
+ return zasins(xinv);
+}