diff options
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry/cscd')
8 files changed, 206 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c b/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c new file mode 100644 index 0000000..ed13f9e --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c @@ -0,0 +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 "csc.h" +#include "cscd.h" +#include <math.h> + +void ccscda(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i<size;i++) + { + out[i] = ccscds(in[i]); + } +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c b/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c new file mode 100644 index 0000000..39b2576 --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c @@ -0,0 +1,29 @@ +/* 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 <math.h> +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "cscd.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccscds(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csins(z)); + return out; +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c b/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c new file mode 100644 index 0000000..8ca3df9 --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c @@ -0,0 +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 "cscd.h" +#include <math.h> + +void dcscda(double* in,int size,double* out) +{ + int i=0; + for(i=0;i<size;i++) + { + out[i]=dcscds(in[i]); + } +} + diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c b/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c new file mode 100644 index 0000000..af4dc30 --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c @@ -0,0 +1,27 @@ +/* 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 "cscd.h" +#include <math.h> + +double dcscds(double in) +{ + double val; + val = (M_PI) / 180.0; + double out; + out=1/sin(in*val); + return out; +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c b/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c new file mode 100644 index 0000000..1793662 --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c @@ -0,0 +1,22 @@ +/* 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 "cscd.h" + +void scscda(float* in,int size,float* out) +{ + int i = 0; + for (i = 0;i<size;++i) + { + out[i] = scscds(in[i]); + } +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c b/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c new file mode 100644 index 0000000..ebf36d2 --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c @@ -0,0 +1,27 @@ +/* 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 "cscd.h" +#include <math.h> + +float scscds(float in) +{ + float out,val; + val=(M_PI)/180.0; + out=1/sin(in*val); + return out; +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c b/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c new file mode 100644 index 0000000..a8a617c --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c @@ -0,0 +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 "csc.h" +#include "cscd.h" +#include <math.h> + +void zcscda(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i<size;i++) + { + out[i] = zcscds(in[i]); + } +} diff --git a/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c b/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c new file mode 100644 index 0000000..47d5dfc --- /dev/null +++ b/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c @@ -0,0 +1,29 @@ +/* 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 <math.h> +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "cscd.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcscds(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zsins(z)); + return out; +} |