diff options
author | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
commit | 9bc7ad78e8d7d7acc4b9387aa592542832e80b31 (patch) | |
tree | 7fce060665a91de5e5adb12d02003351c3d1fdfc /src/c/elementaryFunctions/tanh | |
parent | 33755eb085a3ca8154cf83773b23fbb8aac4ba3e (diff) | |
parent | ac0045f12ad3d0938758e9742f4107a334e1afaa (diff) | |
download | scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.gz scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.bz2 scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.zip |
NEW FEATURES AND NEW FUNCTIONS
Diffstat (limited to 'src/c/elementaryFunctions/tanh')
-rw-r--r-- | src/c/elementaryFunctions/tanh/ctanhs.c | 2 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/i16tanha.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/i16tanhs.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/i8tanha.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/i8tanhs.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/u16tanha.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/u16tanhs.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/u8tanha.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tanh/u8tanhs.c | 18 |
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)); +} |