summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/cos
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/elementaryFunctions/cos')
-rw-r--r--src/c/elementaryFunctions/cos/i16cosa.c19
-rw-r--r--src/c/elementaryFunctions/cos/i16coss.c18
-rw-r--r--src/c/elementaryFunctions/cos/i8cosa.c20
-rw-r--r--src/c/elementaryFunctions/cos/i8coss.c18
-rw-r--r--src/c/elementaryFunctions/cos/u16cosa.c20
-rw-r--r--src/c/elementaryFunctions/cos/u16coss.c18
-rw-r--r--src/c/elementaryFunctions/cos/u8cosa.c20
-rw-r--r--src/c/elementaryFunctions/cos/u8coss.c18
8 files changed, 151 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/cos/i16cosa.c b/src/c/elementaryFunctions/cos/i16cosa.c
new file mode 100644
index 00000000..426eeabc
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/i16cosa.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+#include "cos.h"
+
+void i16cosa(int16* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i16coss(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/cos/i16coss.c b/src/c/elementaryFunctions/cos/i16coss.c
new file mode 100644
index 00000000..787f713b
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/i16coss.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "cos.h"
+
+float i16coss(int16 x) {
+ return (cos((double)x));
+}
diff --git a/src/c/elementaryFunctions/cos/i8cosa.c b/src/c/elementaryFunctions/cos/i8cosa.c
new file mode 100644
index 00000000..2f0053c8
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/i8cosa.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cos.h"
+
+void i8cosa(int8* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i8coss(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/cos/i8coss.c b/src/c/elementaryFunctions/cos/i8coss.c
new file mode 100644
index 00000000..4b344e1d
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/i8coss.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "cos.h"
+
+float i8coss(int8 x) {
+ return (cos((double)x));
+}
diff --git a/src/c/elementaryFunctions/cos/u16cosa.c b/src/c/elementaryFunctions/cos/u16cosa.c
new file mode 100644
index 00000000..6e752e2b
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/u16cosa.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cos.h"
+
+void u16cosa(uint16* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u16coss(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/cos/u16coss.c b/src/c/elementaryFunctions/cos/u16coss.c
new file mode 100644
index 00000000..fb25ac56
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/u16coss.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "cos.h"
+
+float u16coss(uint16 x) {
+ return (cos((double)x));
+}
diff --git a/src/c/elementaryFunctions/cos/u8cosa.c b/src/c/elementaryFunctions/cos/u8cosa.c
new file mode 100644
index 00000000..ad129e12
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/u8cosa.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cos.h"
+
+void u8cosa(uint8* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u8coss(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/cos/u8coss.c b/src/c/elementaryFunctions/cos/u8coss.c
new file mode 100644
index 00000000..26e2eba5
--- /dev/null
+++ b/src/c/elementaryFunctions/cos/u8coss.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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include <math.h>
+#include "cos.h"
+
+float u8coss(uint8 x) {
+ return (cos((double)x));
+}