summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/sind
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-08-10 20:33:46 +0530
committerAbhinav Dronamraju2017-08-10 20:33:46 +0530
commitde496fd5c6183e2f5eba2b4688d2bcf18aef62a1 (patch)
tree81f1fac7d3b728c5bebb44480066eb454ec5d0f6 /2.3-1/src/c/elementaryFunctions/sind
parent6823e5b2c48f92e7e88b7c06fc7b6191e2a3c411 (diff)
parentdcfc88991cdfa7f8e53607094e8d26cae399b78e (diff)
downloadScilab2C-de496fd5c6183e2f5eba2b4688d2bcf18aef62a1.tar.gz
Scilab2C-de496fd5c6183e2f5eba2b4688d2bcf18aef62a1.tar.bz2
Scilab2C-de496fd5c6183e2f5eba2b4688d2bcf18aef62a1.zip
Merge and functions added
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/sind')
-rw-r--r--2.3-1/src/c/elementaryFunctions/sind/dsinda.c20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sind/dsinds.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/sind/ssinda.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/sind/ssinds.c19
4 files changed, 76 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/sind/dsinda.c b/2.3-1/src/c/elementaryFunctions/sind/dsinda.c
new file mode 100644
index 00000000..c13fa0c7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sind/dsinda.c
@@ -0,0 +1,20 @@
+/* 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: Brijesh Gupta C R
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "sind.h"
+
+void dsinda(double* x, int size, double* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = dsinds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sind/dsinds.c b/2.3-1/src/c/elementaryFunctions/sind/dsinds.c
new file mode 100644
index 00000000..f7dc54f1
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sind/dsinds.c
@@ -0,0 +1,18 @@
+/* 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: Brijesh Gupta C R
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include <math.h>
+#include "sind.h"
+#define PI 3.1415927
+
+double dsinds(double x) {
+ return sin(x*PI/180);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sind/ssinda.c b/2.3-1/src/c/elementaryFunctions/sind/ssinda.c
new file mode 100644
index 00000000..baefd68d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sind/ssinda.c
@@ -0,0 +1,19 @@
+/* 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: Brijesh Gupta C R
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include "sind.h"
+
+void ssinda(float* x, int size, double* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = ssinds(x[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sind/ssinds.c b/2.3-1/src/c/elementaryFunctions/sind/ssinds.c
new file mode 100644
index 00000000..9d5bf0e7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sind/ssinds.c
@@ -0,0 +1,19 @@
+/* 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: Brijesh Gupta C R
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include <math.h>
+#include "sind.h"
+#include "sin.h"
+#define PI 3.1415927
+
+float ssinds(float x) {
+ return ssins(x*PI/180);
+}