diff options
Diffstat (limited to 'src/auxiliaryFunctions/pythag')
-rw-r--r-- | src/auxiliaryFunctions/pythag/cpythags.c | 19 | ||||
-rw-r--r-- | src/auxiliaryFunctions/pythag/dpythags.c | 3 | ||||
-rw-r--r-- | src/auxiliaryFunctions/pythag/spythags.c | 3 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/auxiliaryFunctions/pythag/cpythags.c b/src/auxiliaryFunctions/pythag/cpythags.c new file mode 100644 index 00000000..0701ce98 --- /dev/null +++ b/src/auxiliaryFunctions/pythag/cpythags.c @@ -0,0 +1,19 @@ +/* +** -*- C -*- +** +** spythags.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Mon Apr 23 11:31:47 2007 jofret +** Last update Thu Aug 16 12:17:21 2007 bruno +** +** Copyright INRIA 2007 +*/ + +#include "complex.h" +#include "pythag.h" + +floatComplex cpythags(floatComplex x, floatComplex y) { + return (csqrts( cadds(ctimess(x,x), + ctimess(y,y)) )); +} diff --git a/src/auxiliaryFunctions/pythag/dpythags.c b/src/auxiliaryFunctions/pythag/dpythags.c index 0b3eeb5f..a40fa7cd 100644 --- a/src/auxiliaryFunctions/pythag/dpythags.c +++ b/src/auxiliaryFunctions/pythag/dpythags.c @@ -5,13 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Mon Apr 23 11:54:15 2007 jofret -** Last update Mon Apr 23 15:43:21 2007 jofret +** Last update Thu Aug 16 12:10:17 2007 bruno ** ** Copyright INRIA 2007 */ #include "pythag.h" -#include "sqrt.h" double dpythags(double x, double y) { return (dsqrts( (x*x) + (y*y) ) ); diff --git a/src/auxiliaryFunctions/pythag/spythags.c b/src/auxiliaryFunctions/pythag/spythags.c index a4d279a1..47c0e85c 100644 --- a/src/auxiliaryFunctions/pythag/spythags.c +++ b/src/auxiliaryFunctions/pythag/spythags.c @@ -5,13 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Mon Apr 23 11:31:47 2007 jofret -** Last update Mon Apr 23 11:54:06 2007 jofret +** Last update Thu Aug 16 12:10:01 2007 bruno ** ** Copyright INRIA 2007 */ #include "pythag.h" -#include "sqrt.h" float spythags(float x, float y) { return (ssqrts( (x*x) + (y*y) )); |