diff options
Diffstat (limited to 'src/c/elementaryFunctions/sin')
-rw-r--r-- | src/c/elementaryFunctions/sin/i16sina.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/i16sins.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/i8sina.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/i8sins.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/u16sina.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/u16sins.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/u8sina.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/sin/u8sins.c | 18 |
8 files changed, 152 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/sin/i16sina.c b/src/c/elementaryFunctions/sin/i16sina.c new file mode 100644 index 00000000..4e9a3b06 --- /dev/null +++ b/src/c/elementaryFunctions/sin/i16sina.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 "sin.h" + +void i16sina(int16* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = i16sins(x[i]); + } +} diff --git a/src/c/elementaryFunctions/sin/i16sins.c b/src/c/elementaryFunctions/sin/i16sins.c new file mode 100644 index 00000000..6fcbd26f --- /dev/null +++ b/src/c/elementaryFunctions/sin/i16sins.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 "sin.h" + +float i16sins(int16 x) { + return (sin((double)x)); +} diff --git a/src/c/elementaryFunctions/sin/i8sina.c b/src/c/elementaryFunctions/sin/i8sina.c new file mode 100644 index 00000000..2457388f --- /dev/null +++ b/src/c/elementaryFunctions/sin/i8sina.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 "sin.h" + +void i8sina(int8* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = i8sins(x[i]); + } +} diff --git a/src/c/elementaryFunctions/sin/i8sins.c b/src/c/elementaryFunctions/sin/i8sins.c new file mode 100644 index 00000000..23823566 --- /dev/null +++ b/src/c/elementaryFunctions/sin/i8sins.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 "sin.h" + +float i8sins(int8 x) { + return (sin((double)x)); +} diff --git a/src/c/elementaryFunctions/sin/u16sina.c b/src/c/elementaryFunctions/sin/u16sina.c new file mode 100644 index 00000000..03054c20 --- /dev/null +++ b/src/c/elementaryFunctions/sin/u16sina.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 "sin.h" + +void u16sina(uint16* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = u16sins(x[i]); + } +} diff --git a/src/c/elementaryFunctions/sin/u16sins.c b/src/c/elementaryFunctions/sin/u16sins.c new file mode 100644 index 00000000..651b8e1a --- /dev/null +++ b/src/c/elementaryFunctions/sin/u16sins.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 "sin.h" + +float u16sins(uint16 x) { + return (sin((double)x)); +} diff --git a/src/c/elementaryFunctions/sin/u8sina.c b/src/c/elementaryFunctions/sin/u8sina.c new file mode 100644 index 00000000..271d6451 --- /dev/null +++ b/src/c/elementaryFunctions/sin/u8sina.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 "sin.h" + +void u8sina(uint8* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = u8sins(x[i]); + } +} diff --git a/src/c/elementaryFunctions/sin/u8sins.c b/src/c/elementaryFunctions/sin/u8sins.c new file mode 100644 index 00000000..f7c982f2 --- /dev/null +++ b/src/c/elementaryFunctions/sin/u8sins.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 "sin.h" + +float u8sins(uint8 x) { + return (sin((double)x)); +} |