diff options
author | siddhu8990 | 2017-04-19 14:57:49 +0530 |
---|---|---|
committer | siddhu8990 | 2017-04-19 14:57:49 +0530 |
commit | b9cfdca438347fe4d28f7caff3cb7b382e455d3a (patch) | |
tree | 948593b7d89741f804919a74f2e5e34b39adb0a0 /2.3-1/src/c/elementaryFunctions/Trigonometry/coth | |
parent | 586db6343e7b472d8dc3e63a82f4c73f99cdcbd7 (diff) | |
download | Scilab2C-b9cfdca438347fe4d28f7caff3cb7b382e455d3a.tar.gz Scilab2C-b9cfdca438347fe4d28f7caff3cb7b382e455d3a.tar.bz2 Scilab2C-b9cfdca438347fe4d28f7caff3cb7b382e455d3a.zip |
Merged Shamik's work
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/coth')
8 files changed, 99 insertions, 0 deletions
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..4e794512 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c @@ -0,0 +1,12 @@ +#include "coth.h" +#include <math.h> + +void ccotha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i<size;i++) + { + out[i] = ccoths(in[i]); + } + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c new file mode 100644 index 00000000..564b8e69 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c @@ -0,0 +1,14 @@ +#include <math.h> +#include "coth.h" +#include <math.h> +#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..f6304f58 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c @@ -0,0 +1,14 @@ +#include "coth.h" +#include <math.h> + +void dcotha(double* in,int size,double* out) +{ + double val; + int i=0; + for(i=0;i<size;i++) + { + out[i]=cosh(in[i])/sinh(in[i]); + /*printf("The cotangent of %lf is %lf\n", in[i], out[i]);*/ + } +} + diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c new file mode 100644 index 00000000..bf6bb78d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c @@ -0,0 +1,10 @@ +#include <math.h> +#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..3fdf37f7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c @@ -0,0 +1,14 @@ +#include "coth.h" +#include <math.h> + +void scotha(float* in,int size,float* out) +{ + float val; + int i=0; + for(i=0;i<size;i++) + { + out[i]=cosh(in[i])/sinh(in[i]); + /*printf("The cotangent of %lf is %lf\n", in[i], out[i]);*/ + } +} + diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c new file mode 100644 index 00000000..107945e5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c @@ -0,0 +1,10 @@ +#include <math.h> +#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..dcbb2844 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c @@ -0,0 +1,11 @@ +#include "coth.h" +#include <math.h> + +void zcotha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i<size;i++) + { + out[i] = zcoths(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c new file mode 100644 index 00000000..2eed86bb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c @@ -0,0 +1,14 @@ +#include "coth.h" +#include "tanh.h" +#include "tan.h" +#include <math.h> +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcoths(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),ztanhs(z)); + return out; +} |