diff options
author | Sandeep Gupta | 2017-06-18 23:55:40 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-06-18 23:55:40 +0530 |
commit | b43eccd4cffed5bd1017c5821524fb6e49202f78 (patch) | |
tree | 4c53d798252cbeae9bcf7dc9604524b20bb10f27 /2.3-1/src/c/elementaryFunctions/acot | |
download | Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.gz Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.bz2 Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.zip |
First commit
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/acot')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/cacota.c | 21 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/cacots.c | 23 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/dacota.c | 20 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/dacots.c | 18 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/sacota.c | 20 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/sacots.c | 18 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/zacota.c | 21 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/acot/zacots.c | 23 |
8 files changed, 164 insertions, 0 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/acot/cacota.c b/2.3-1/src/c/elementaryFunctions/acot/cacota.c new file mode 100644 index 00000000..64e82b21 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/cacota.c @@ -0,0 +1,21 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include "acot.h" +#include "floatComplex.h" + +void cacota(floatComplex* x, int size, floatComplex* y) +{ + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cacots(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/cacots.c b/2.3-1/src/c/elementaryFunctions/acot/cacots.c new file mode 100644 index 00000000..f4c6236e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/cacots.c @@ -0,0 +1,23 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include <math.h> +#include "acot.h" +#include "division.h" +#include "floatComplex.h" +#include "atan.h" + +floatComplex cacots(floatComplex x) +{ + floatComplex xinv; + xinv = crdivs(FloatComplex(1,0),x); + return catans(xinv); +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/dacota.c b/2.3-1/src/c/elementaryFunctions/acot/dacota.c new file mode 100644 index 00000000..794d0817 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/dacota.c @@ -0,0 +1,20 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include "acot.h" + +void dacota(double* x, int size, double* y) +{ + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dacots(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/dacots.c b/2.3-1/src/c/elementaryFunctions/acot/dacots.c new file mode 100644 index 00000000..42ce7b57 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/dacots.c @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include <math.h> +#include "acot.h" + +double dacots(double x) +{ + return ((3.14159265359/2)-atan(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/sacota.c b/2.3-1/src/c/elementaryFunctions/acot/sacota.c new file mode 100644 index 00000000..b99a7739 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/sacota.c @@ -0,0 +1,20 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include "acot.h" + +void sacota(float* x, int size, float* y) +{ + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sacots(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/sacots.c b/2.3-1/src/c/elementaryFunctions/acot/sacots.c new file mode 100644 index 00000000..db6dca2f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/sacots.c @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include <math.h> +#include "acot.h" + +float sacots(float x) +{ + return ((3.14159265359/2)-atanf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/zacota.c b/2.3-1/src/c/elementaryFunctions/acot/zacota.c new file mode 100644 index 00000000..d08ebddd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/zacota.c @@ -0,0 +1,21 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include "acot.h" +#include "doubleComplex.h" + +void zacota(doubleComplex* x, int size, doubleComplex* y) +{ + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zacots(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acot/zacots.c b/2.3-1/src/c/elementaryFunctions/acot/zacots.c new file mode 100644 index 00000000..3bf99b2c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acot/zacots.c @@ -0,0 +1,23 @@ +// Copyright (C) 2017 - 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 +// Organization: FOSSEE, IIT Bombay +// Author: Ashish Kamble +// Email: toolbox@scilab.in + +#include <math.h> +#include "acot.h" +#include "division.h" +#include "doubleComplex.h" +#include "atan.h" + +doubleComplex zacots(doubleComplex x) +{ + doubleComplex xinv; + xinv = zrdivs(DoubleComplex(1,0),x); + return zatans(xinv); +} |