diff options
Diffstat (limited to 'src/elementaryFunctions/acosh')
-rw-r--r-- | src/elementaryFunctions/acosh/cacosha.c | 4 | ||||
-rw-r--r-- | src/elementaryFunctions/acosh/dacosha.c | 4 | ||||
-rw-r--r-- | src/elementaryFunctions/acosh/sacosha.c | 4 | ||||
-rw-r--r-- | src/elementaryFunctions/acosh/testAcosh.c | 32 | ||||
-rw-r--r-- | src/elementaryFunctions/acosh/zacosha.c | 4 |
5 files changed, 25 insertions, 23 deletions
diff --git a/src/elementaryFunctions/acosh/cacosha.c b/src/elementaryFunctions/acosh/cacosha.c index 2191ab31..dd4fa6ba 100644 --- a/src/elementaryFunctions/acosh/cacosha.c +++ b/src/elementaryFunctions/acosh/cacosha.c @@ -5,14 +5,14 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:23:49 2007 jofret -** Last update Thu Sep 6 10:44:18 2007 bruno +** Last update Mon Oct 22 09:59:42 2007 bruno ** ** Copyright INRIA 2007 */ #include "acosh.h" -void cacosha(floatComplex* x, floatComplex* y, int size) { +void cacosha(floatComplex* x, int size, floatComplex* y) { int i = 0; for (i = 0; i < size; ++i) { y[i] = cacoshs(x[i]); diff --git a/src/elementaryFunctions/acosh/dacosha.c b/src/elementaryFunctions/acosh/dacosha.c index 27536bcb..f6ddc6fc 100644 --- a/src/elementaryFunctions/acosh/dacosha.c +++ b/src/elementaryFunctions/acosh/dacosha.c @@ -5,14 +5,14 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 11:29:20 2007 jofret -** Last update Thu Sep 6 10:43:55 2007 bruno +** Last update Mon Oct 22 09:59:29 2007 bruno ** ** Copyright INRIA 2007 */ #include "acosh.h" -void dacosha(double* x, double* y, int size) { +void dacosha(double* x, int size, double* y) { int i = 0; for (i = 0; i < size; ++i) { y[i] = dacoshs(x[i]); diff --git a/src/elementaryFunctions/acosh/sacosha.c b/src/elementaryFunctions/acosh/sacosha.c index c0c21ad5..450a8a3e 100644 --- a/src/elementaryFunctions/acosh/sacosha.c +++ b/src/elementaryFunctions/acosh/sacosha.c @@ -5,14 +5,14 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:25:57 2007 jofret -** Last update Thu Sep 6 10:43:26 2007 bruno +** Last update Mon Oct 22 09:59:20 2007 bruno ** ** Copyright INRIA 2007 */ #include "acosh.h" -void sacosha(float* x, float* y, int size) { +void sacosha(float* x, int size, float* y) { int i = 0; for (i = 0; i < size; ++i) { y[i] = sacoshs(x[i]); diff --git a/src/elementaryFunctions/acosh/testAcosh.c b/src/elementaryFunctions/acosh/testAcosh.c index 8681dc60..fb49d8de 100644 --- a/src/elementaryFunctions/acosh/testAcosh.c +++ b/src/elementaryFunctions/acosh/testAcosh.c @@ -5,7 +5,7 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 15:05:44 2006 jofret -** Last update Thu Sep 6 10:42:52 2007 bruno +** Last update Mon Oct 22 11:58:49 2007 bruno ** ** Copyright INRIA 2006 */ @@ -84,7 +84,7 @@ void sacoshaTest(void) { int i = 0; printf(">> Float array\n"); - sacosha(in, out, 5); + sacosha(in, 5, out); for (i = 0 ; i < 5 ; ++i) printf("sacosha(array) = %f\n", out[i]); } @@ -95,37 +95,39 @@ void dacoshaTest(void) { int i = 0; printf(">> Double Array\n"); - dacosha(in, out, 5); + dacosha(in, 5, out); for (i = 0 ; i < 5 ; ++i) printf("sacosha(array) = %f\n", out[i]); } void cacoshaTest(void) { - floatComplex pi_pi = FloatComplex(PI, PI); - floatComplex pi_2_pi_2 = FloatComplex(PI/2, PI/2); - floatComplex pi_2_pi_3 = FloatComplex(PI/2, PI/3); - floatComplex pi_2_pi_4 = FloatComplex(PI/2, PI/4); - floatComplex in[4] = {pi_pi, pi_2_pi_2, pi_2_pi_3, pi_2_pi_4}; + floatComplex in[4]; floatComplex out[4]; int i = 0; - cacosha(in, out, 4); + in[0] = FloatComplex(PI, PI); + in[1] = FloatComplex(PI/2, PI/2); + in[2] = FloatComplex(PI/2, PI/3); + in[3] = FloatComplex(PI/2, PI/4); + + cacosha(in, 4, out); printf(">> Float Complex Array\n"); for (i = 0 ; i < 4 ; ++i) printf("cacosha(array) = %e + I * %e\n", creals(out[i]), cimags(out[i])); } void zacoshaTest(void) { - doubleComplex pi_pi = DoubleComplex(PI, PI); - doubleComplex pi_2_pi_2 = DoubleComplex(PI/2, PI/2); - doubleComplex pi_2_pi_3 = DoubleComplex(PI/2, PI/3); - doubleComplex pi_2_pi_4 = DoubleComplex(PI/2, PI/4); - doubleComplex in[4] = {pi_pi, pi_2_pi_2, pi_2_pi_3, pi_2_pi_4 }; + doubleComplex in[4]; doubleComplex out[4]; int i = 0; - zacosha(in, out, 4); + in[0] = DoubleComplex(PI, PI); + in[1] = DoubleComplex(PI/2, PI/2); + in[2] = DoubleComplex(PI/2, PI/3); + in[3] = DoubleComplex(PI/2, PI/4); + + zacosha(in, 4, out); printf(">> Double Complex Array\n"); for (i = 0 ; i < 4 ; ++i) printf("zacosha(array) = %e + I * %e\n", zreals(out[i]), zimags(out[i])); diff --git a/src/elementaryFunctions/acosh/zacosha.c b/src/elementaryFunctions/acosh/zacosha.c index 1fca9a3d..08329151 100644 --- a/src/elementaryFunctions/acosh/zacosha.c +++ b/src/elementaryFunctions/acosh/zacosha.c @@ -5,14 +5,14 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:25:14 2007 jofret -** Last update Thu Sep 6 10:42:27 2007 bruno +** Last update Mon Oct 22 09:59:06 2007 bruno ** ** Copyright INRIA 2007 */ #include "acosh.h" -void zacosha(doubleComplex* x, doubleComplex* y, int size) { +void zacosha(doubleComplex* x, int size, doubleComplex* y) { int i = 0; for (i = 0; i < size; ++i) { y[i] = zacoshs(x[i]); |