diff options
Diffstat (limited to 'src/c/elementaryFunctions/acot')
-rw-r--r-- | src/c/elementaryFunctions/acot/cacota.c | 21 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/cacots.c | 23 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/dacota.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/dacots.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/sacota.c | 20 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/sacots.c | 18 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/zacota.c | 21 | ||||
-rw-r--r-- | src/c/elementaryFunctions/acot/zacots.c | 23 |
8 files changed, 164 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/acot/cacota.c b/src/c/elementaryFunctions/acot/cacota.c new file mode 100644 index 0000000..64e82b2 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/cacots.c b/src/c/elementaryFunctions/acot/cacots.c new file mode 100644 index 0000000..f4c6236 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/dacota.c b/src/c/elementaryFunctions/acot/dacota.c new file mode 100644 index 0000000..794d081 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/dacots.c b/src/c/elementaryFunctions/acot/dacots.c new file mode 100644 index 0000000..42ce7b5 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/sacota.c b/src/c/elementaryFunctions/acot/sacota.c new file mode 100644 index 0000000..b99a773 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/sacots.c b/src/c/elementaryFunctions/acot/sacots.c new file mode 100644 index 0000000..db6dca2 --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/zacota.c b/src/c/elementaryFunctions/acot/zacota.c new file mode 100644 index 0000000..d08ebdd --- /dev/null +++ b/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/src/c/elementaryFunctions/acot/zacots.c b/src/c/elementaryFunctions/acot/zacots.c new file mode 100644 index 0000000..3bf99b2 --- /dev/null +++ b/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); +} |