summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/tanh
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/elementaryFunctions/tanh')
-rw-r--r--src/c/elementaryFunctions/tanh/ctanhs.c2
-rw-r--r--src/c/elementaryFunctions/tanh/i16tanha.c20
-rw-r--r--src/c/elementaryFunctions/tanh/i16tanhs.c18
-rw-r--r--src/c/elementaryFunctions/tanh/i8tanha.c20
-rw-r--r--src/c/elementaryFunctions/tanh/i8tanhs.c18
-rw-r--r--src/c/elementaryFunctions/tanh/u16tanha.c20
-rw-r--r--src/c/elementaryFunctions/tanh/u16tanhs.c18
-rw-r--r--src/c/elementaryFunctions/tanh/u8tanha.c20
-rw-r--r--src/c/elementaryFunctions/tanh/u8tanhs.c18
9 files changed, 153 insertions, 1 deletions
diff --git a/src/c/elementaryFunctions/tanh/ctanhs.c b/src/c/elementaryFunctions/tanh/ctanhs.c
index 5111dbd7..24c1fa68 100644
--- a/src/c/elementaryFunctions/tanh/ctanhs.c
+++ b/src/c/elementaryFunctions/tanh/ctanhs.c
@@ -13,7 +13,7 @@
#include "tanh.h"
#include "tan.h"
-floatComplex ctanhs(floatComplex z) {
+floatComplex ctanhs(floatComplex z) {
float real = creals(z);
float imag = cimags(z);
diff --git a/src/c/elementaryFunctions/tanh/i16tanha.c b/src/c/elementaryFunctions/tanh/i16tanha.c
new file mode 100644
index 00000000..3a4e37cd
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/i16tanha.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 "tanh.h"
+
+void i16tanha(int16* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i16tanhs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/tanh/i16tanhs.c b/src/c/elementaryFunctions/tanh/i16tanhs.c
new file mode 100644
index 00000000..7d8b1843
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/i16tanhs.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 "tanh.h"
+
+float i16tanhs(int16 x) {
+ return (tanhf(x));
+}
diff --git a/src/c/elementaryFunctions/tanh/i8tanha.c b/src/c/elementaryFunctions/tanh/i8tanha.c
new file mode 100644
index 00000000..dca31761
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/i8tanha.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 "tanh.h"
+
+void i8tanha(int8* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = i8tanhs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/tanh/i8tanhs.c b/src/c/elementaryFunctions/tanh/i8tanhs.c
new file mode 100644
index 00000000..6351e5c8
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/i8tanhs.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 "tanh.h"
+
+float i8tanhs(int8 x) {
+ return (tanhf(x));
+}
diff --git a/src/c/elementaryFunctions/tanh/u16tanha.c b/src/c/elementaryFunctions/tanh/u16tanha.c
new file mode 100644
index 00000000..61db747b
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/u16tanha.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 "tanh.h"
+
+void u16tanha(uint16* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u16tanhs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/tanh/u16tanhs.c b/src/c/elementaryFunctions/tanh/u16tanhs.c
new file mode 100644
index 00000000..17909e7c
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/u16tanhs.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 "tanh.h"
+
+float u16tanhs(uint16 x) {
+ return (tanhf(x));
+}
diff --git a/src/c/elementaryFunctions/tanh/u8tanha.c b/src/c/elementaryFunctions/tanh/u8tanha.c
new file mode 100644
index 00000000..9ca20eeb
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/u8tanha.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 "tanh.h"
+
+void u8tanha(uint8* x, int size, float* y) {
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ y[i] = u8tanhs(x[i]);
+ }
+}
diff --git a/src/c/elementaryFunctions/tanh/u8tanhs.c b/src/c/elementaryFunctions/tanh/u8tanhs.c
new file mode 100644
index 00000000..c6179f9d
--- /dev/null
+++ b/src/c/elementaryFunctions/tanh/u8tanhs.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 "tanh.h"
+
+float u8tanhs(uint8 x) {
+ return (tanhf(x));
+}