diff options
author | siddhu8990 | 2017-05-22 15:13:54 +0530 |
---|---|---|
committer | siddhu8990 | 2017-05-22 15:13:54 +0530 |
commit | b33afdb2311fbe8aad4c5c614c6098585fe2d279 (patch) | |
tree | 3d8db91388dab60159248fb0cfef160ca03cefeb /src/c/elementaryFunctions/Trigonometry/cosd | |
parent | f0e074cc43f04f58aafe00742b9748a09f77894f (diff) | |
parent | e36eac94dd517bb69d3e5782516ee58942451991 (diff) | |
download | Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.gz Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.bz2 Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.zip |
Bugs fixed for Scilab 6.0
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry/cosd')
4 files changed, 59 insertions, 4 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c b/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c index b48876e..65a6f4a 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c @@ -1,14 +1,24 @@ +/* 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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #include "cosd.h" #include <math.h> void dcosda(double* in,int size,double* out) { - double val=0.0; - val =3.14159265/180.0; int i=0; for (i=0;i<size;i++) { - out[i] = cos(in[i]*val); + out[i] = dcosds(in[i]); } } diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c b/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c index 4550757..8bc6d4a 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c @@ -1,3 +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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifdef _WIN32 + #define _USE_MATH_DEFINES +#endif + #include <math.h> #include "cos.h" #include "cosd.h" diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c b/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c index 5224899..7e0714d 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c @@ -1,7 +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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #include "cos.h" #include "cosd.h" -void scosda(float* in, int size, float* out) { +void scosda(float* in, int size, float* out) +{ int i = 0; for (i = 0; i < size; ++i) { out[i] = scosds(in[i]); diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c b/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c index e99a195..45c788f 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c @@ -1,3 +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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifdef _WIN32 + #define _USE_MATH_DEFINES +#endif + #include <math.h> #include "cosd.h" #include "cos.h" |