diff options
Diffstat (limited to 'src/c/elementaryFunctions/tand')
-rw-r--r-- | src/c/elementaryFunctions/tand/dtanda.c | 19 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tand/dtands.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tand/standa.c | 19 | ||||
-rw-r--r-- | src/c/elementaryFunctions/tand/stands.c | 19 |
4 files changed, 75 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/tand/dtanda.c b/src/c/elementaryFunctions/tand/dtanda.c new file mode 100644 index 0000000..e5d56a8 --- /dev/null +++ b/src/c/elementaryFunctions/tand/dtanda.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 "tand.h" + +void dtanda(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dtands(x[i]); + } +} diff --git a/src/c/elementaryFunctions/tand/dtands.c b/src/c/elementaryFunctions/tand/dtands.c new file mode 100644 index 0000000..6fda5b7 --- /dev/null +++ b/src/c/elementaryFunctions/tand/dtands.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 "tand.h" +#define PI 3.1415927 + +double dtands(double x) { + return tan(x*PI/180); +} diff --git a/src/c/elementaryFunctions/tand/standa.c b/src/c/elementaryFunctions/tand/standa.c new file mode 100644 index 0000000..e37f5a0 --- /dev/null +++ b/src/c/elementaryFunctions/tand/standa.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 "tand.h" + +void standa(float* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = stands(x[i]); + } +} diff --git a/src/c/elementaryFunctions/tand/stands.c b/src/c/elementaryFunctions/tand/stands.c new file mode 100644 index 0000000..4d66701 --- /dev/null +++ b/src/c/elementaryFunctions/tand/stands.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 "tand.h" +#include "tan.h" +#define PI 3.1415927 + +float stands(float x) { + return stans(x*PI/180); +} |