From a555820564d9f2e95ca8c97871339d3a5a2081c3 Mon Sep 17 00:00:00 2001 From: Ankit Raj Date: Wed, 21 Jun 2017 10:26:59 +0530 Subject: Updated Scilab2C --- .../elementaryFunctions/Trigonometry/cosd/dcosda.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/cosd/dcosds.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/cosd/scosda.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/cosd/scosds.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/cotd/dcotda.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/cotd/dcotds.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/cotd/scotda.c | 20 ++++++++++ .../elementaryFunctions/Trigonometry/cotd/scotds.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/coth/ccotha.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/coth/ccoths.c | 26 ++++++++++++ .../elementaryFunctions/Trigonometry/coth/dcotha.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/coth/dcoths.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/coth/scotha.c | 25 ++++++++++++ .../elementaryFunctions/Trigonometry/coth/scoths.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/coth/zcotha.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/coth/zcoths.c | 26 ++++++++++++ .../c/elementaryFunctions/Trigonometry/csc/ccsca.c | 23 +++++++++++ .../c/elementaryFunctions/Trigonometry/csc/ccscs.c | 28 +++++++++++++ .../c/elementaryFunctions/Trigonometry/csc/dcsca.c | 22 +++++++++++ .../c/elementaryFunctions/Trigonometry/csc/dcscs.c | 21 ++++++++++ .../c/elementaryFunctions/Trigonometry/csc/scsca.c | 22 +++++++++++ .../c/elementaryFunctions/Trigonometry/csc/scscs.c | 21 ++++++++++ .../c/elementaryFunctions/Trigonometry/csc/zcsca.c | 23 +++++++++++ .../c/elementaryFunctions/Trigonometry/csc/zcscs.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/cscd/ccscda.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/cscd/ccscds.c | 29 ++++++++++++++ .../elementaryFunctions/Trigonometry/cscd/dcscda.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/cscd/dcscds.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/cscd/scscda.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/cscd/scscds.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/cscd/zcscda.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/cscd/zcscds.c | 29 ++++++++++++++ .../elementaryFunctions/Trigonometry/csch/ccscha.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/csch/ccschs.c | 26 ++++++++++++ .../elementaryFunctions/Trigonometry/csch/dcscha.c | 20 ++++++++++ .../elementaryFunctions/Trigonometry/csch/dcschs.c | 21 ++++++++++ .../elementaryFunctions/Trigonometry/csch/scscha.c | 20 ++++++++++ .../elementaryFunctions/Trigonometry/csch/scschs.c | 21 ++++++++++ .../elementaryFunctions/Trigonometry/csch/zcscha.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/csch/zcschs.c | 26 ++++++++++++ .../c/elementaryFunctions/Trigonometry/sec/cseca.c | 23 +++++++++++ .../c/elementaryFunctions/Trigonometry/sec/csecs.c | 25 ++++++++++++ .../c/elementaryFunctions/Trigonometry/sec/dseca.c | 23 +++++++++++ .../c/elementaryFunctions/Trigonometry/sec/dsecs.c | 19 +++++++++ .../c/elementaryFunctions/Trigonometry/sec/sseca.c | 20 ++++++++++ .../c/elementaryFunctions/Trigonometry/sec/ssecs.c | 19 +++++++++ .../c/elementaryFunctions/Trigonometry/sec/zseca.c | 23 +++++++++++ .../c/elementaryFunctions/Trigonometry/sec/zsecs.c | 26 ++++++++++++ .../elementaryFunctions/Trigonometry/secd/dsecda.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/secd/dsecds.c | 26 ++++++++++++ .../elementaryFunctions/Trigonometry/secd/ssecda.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/secd/ssecds.c | 24 +++++++++++ .../elementaryFunctions/Trigonometry/sech/csecha.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/sech/csechs.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/sech/dsecha.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/sech/dsechs.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/sech/ssecha.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/sech/ssechs.c | 22 +++++++++++ .../elementaryFunctions/Trigonometry/sech/zsecha.c | 23 +++++++++++ .../elementaryFunctions/Trigonometry/sech/zsechs.c | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/sinc/dsinca.c | 46 ++++++++++++++++++++++ .../Trigonometry/sinc/int_sinc.h | 18 +++++++++ .../c/elementaryFunctions/Trigonometry/sinc/sinc.h | 27 +++++++++++++ .../elementaryFunctions/Trigonometry/sinc/zsinca.c | 31 +++++++++++++++ 64 files changed, 1537 insertions(+) create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/csecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dsecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zsecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/int_sinc.h create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/sinc.h create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry') diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c new file mode 100644 index 00000000..65a6f4a2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.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 "cosd.h" +#include + +void dcosda(double* in,int size,double* out) +{ + int i=0; + for (i=0;i +#include "cos.h" +#include "cosd.h" + +double dcosds(double in) +{ + if(cos((M_PI/180.0)*in)==0.0) + return 0.0; + else + return (cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c new file mode 100644 index 00000000..7e0714db --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.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 "cos.h" +#include "cosd.h" + +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/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c new file mode 100644 index 00000000..45c788ff --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.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 +#include "cosd.h" +#include "cos.h" + +float scosds(float in) +{ + if(cosf((M_PI/180.0)*in)==0.0) + return 0.0; + else + return (cosf((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c new file mode 100644 index 00000000..3a4b23c1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c @@ -0,0 +1,23 @@ +/* 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 "cotd.h" + +void dcotda(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "cotd.h" + +double dcotds(double in) +{ + return (1/tan((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c new file mode 100644 index 00000000..fbdf0f50 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "cotd.h" + +void scotda(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = scotds(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c new file mode 100644 index 00000000..e7e02b9d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c @@ -0,0 +1,23 @@ +/* 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 +#include "cotd.h" + +float scotds(float in) +{ + return (1/tanf((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c new file mode 100644 index 00000000..44a366e8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.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 "coth.h" +#include + +void ccotha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "coth.h" +#include +#include "tanh.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccoths(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0), ctanhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c new file mode 100644 index 00000000..bb54b200 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.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 "coth.h" +#include + +void dcotha(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "coth.h" +#include "cosh.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" + +double dcoths(double in) { + return (cosh(in)/sinh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c new file mode 100644 index 00000000..53351621 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c @@ -0,0 +1,25 @@ +/* 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 "coth.h" +#include + +void scotha(float* in,int size,float* out) +{ + float val; + int i=0; + for(i=0;i +#include "coth.h" +#include "cosh.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" + +float scoths(float in) { + return (cosh(in)/sinh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c new file mode 100644 index 00000000..206cc43f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c @@ -0,0 +1,23 @@ +/* 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 "coth.h" +#include + +void zcotha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcoths(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),ztanhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c new file mode 100644 index 00000000..7ec9a6b8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c @@ -0,0 +1,23 @@ +/* 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 + +void ccsca(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccscs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csins(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c new file mode 100644 index 00000000..b1a3cf3b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.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 "csc.h" + +void dcsca(double* in,int size,double* out) +{ + int i = 0; + for (i = 0;i + +double dcscs(double in) +{ + double out; + out=1/sin(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c new file mode 100644 index 00000000..cea8338f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.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 "csc.h" + +void scsca(float* in,int size,float* out) +{ + int i = 0; + for (i = 0;i + +float scscs(float in) +{ + float out; + out=1/sin(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c new file mode 100644 index 00000000..59430925 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c @@ -0,0 +1,23 @@ +/* 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 + +void zcsca(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcscs(doubleComplex z) +{ + double real = zreals(z); + double imag = zimags(z); + return zrdivs(DoubleComplex(1,0),(DoubleComplex(dsins(real) * dcoshs(imag), dcoss(real) * dsinhs(imag)))); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c new file mode 100644 index 00000000..ed13f9e7 --- /dev/null +++ b/2.3-1/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 + +void ccscda(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#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/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c new file mode 100644 index 00000000..8ca3df94 --- /dev/null +++ b/2.3-1/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 + +void dcscda(double* in,int size,double* out) +{ + int i=0; + for(i=0;i + +double dcscds(double in) +{ + double val; + val = (M_PI) / 180.0; + double out; + out=1/sin(in*val); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c new file mode 100644 index 00000000..17936628 --- /dev/null +++ b/2.3-1/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 + +float scscds(float in) +{ + float out,val; + val=(M_PI)/180.0; + out=1/sin(in*val); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c new file mode 100644 index 00000000..a8a617c2 --- /dev/null +++ b/2.3-1/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 + +void zcscda(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#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; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c new file mode 100644 index 00000000..a95da200 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c @@ -0,0 +1,23 @@ +/* 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 "csch.h" +#include + +void ccscha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "floatComplex.h" +#include "division.h" + +floatComplex ccschs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csinhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c new file mode 100644 index 00000000..32489051 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "csch.h" + +void dcscha(double* in, int size, double* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = dcschs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c new file mode 100644 index 00000000..7b1f15ae --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c @@ -0,0 +1,21 @@ +/* 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 "csch.h" +#include + +double dcschs(double in) +{ + double out; + out=1/sinh(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c new file mode 100644 index 00000000..18d5ea79 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "csch.h" + +void scscha(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = scschs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c new file mode 100644 index 00000000..ec550850 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c @@ -0,0 +1,21 @@ +/* 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 "csch.h" +#include + +float scschs(float in) +{ + float out; + out=1/sinh(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c new file mode 100644 index 00000000..fab5cc43 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c @@ -0,0 +1,23 @@ +/* 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 "csch.h" +#include + +void zcscha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcschs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zsinhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c new file mode 100644 index 00000000..fcb9b81a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c @@ -0,0 +1,23 @@ +/* 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 "sec.h" +#include + +void cseca(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "floatComplex.h" +#include "division.h" + +floatComplex csecs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),ccoss(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c new file mode 100644 index 00000000..c39f7c6e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c @@ -0,0 +1,23 @@ +/* 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 "sec.h" +#include + +void dseca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sec.h" + +double dsecs(double in) +{ + return (1/cos(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c new file mode 100644 index 00000000..0ac7cc62 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "sec.h" + +void sseca(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = ssecs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c new file mode 100644 index 00000000..ad480005 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.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: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include +#include "sec.h" + +float ssecs(float in) +{ + return (1/cos(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c new file mode 100644 index 00000000..dec365d1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c @@ -0,0 +1,23 @@ +/* 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 "sec.h" +#include + +void zseca(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zsecs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zcoss(z)); + return out; +} \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c new file mode 100644 index 00000000..f9f70f0c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c @@ -0,0 +1,23 @@ +/* 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 "secd.h" +#include + +void dsecda(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sec.h" +#include "secd.h" + +double dsecds(double in) +{ + return (1/cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c new file mode 100644 index 00000000..c1fc5e53 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.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 "sec.h" +#include "secd.h" + +void ssecda(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = ssecds(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c new file mode 100644 index 00000000..eaf3a298 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.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 +*/ + + +#ifdef _WIN32 + #define _USE_MATH_DEFINES +#endif + +#include +#include "secd.h" +#include "sec.h" + +float ssecds(float in) { + return (1/cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c new file mode 100644 index 00000000..c8d52d82 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c @@ -0,0 +1,23 @@ +/* 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 "sech.h" +#include + +void csecha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "cos.h" +#include "cosh.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex csechs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),ccoshs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c new file mode 100644 index 00000000..4092c9e8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.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 "sech.h" +#include +void dsecha(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sech.h" +#include "cosh.h" +#include "cos.h" + + +double dsechs(double in) +{ + return (1/cosh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c new file mode 100644 index 00000000..d7e71b33 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.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 "sech.h" +#include +void ssecha(float* in,int size,float* out) +{ + int i=0; + for(i=0;i +#include "sech.h" +#include "cosh.h" +#include "cos.h" + + +float ssechs(float in) +{ + return (1/cosh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c new file mode 100644 index 00000000..a3c3189f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c @@ -0,0 +1,23 @@ +/* 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 "sech.h" +#include + +void zsecha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "cos.h" +#include "cosh.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zsechs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zcoshs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c new file mode 100644 index 00000000..0cd24e96 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c @@ -0,0 +1,46 @@ +/* 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: Ankit Raj + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#include +#include +#include "sinc.h" +#define PI 3.14159265358979 +void dsinca(double* sample,int size,double* oup) +{ + int j; + for(j=0;j +#include +#include "sinc.h" +#include "sin.h" +#include "doubleComplex.h" +void zsinca(doubleComplex* sample,int size,doubleComplex* oup) +{ + int j; + for(j=0;j