diff options
Diffstat (limited to 'src/elementaryFunctions/tanh')
-rw-r--r-- | src/elementaryFunctions/tanh/ctanhs.c | 10 | ||||
-rw-r--r-- | src/elementaryFunctions/tanh/ztanhs.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/elementaryFunctions/tanh/ctanhs.c b/src/elementaryFunctions/tanh/ctanhs.c index 6eb84827..aae62956 100644 --- a/src/elementaryFunctions/tanh/ctanhs.c +++ b/src/elementaryFunctions/tanh/ctanhs.c @@ -5,14 +5,20 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Wed Jan 31 10:56:39 2007 jofret +** Last update Tue Feb 13 11:03:07 2007 jofret ** ** Copyright INRIA 2006 */ #include "floatComplex.h" +floatComplex ctans(floatComplex); + floatComplex ctanhs(floatComplex z) { - /* FIXME: Dummy... */ + float real = creal(z); + float imag = cimag(z); + + floatComplex result = ctans(FloatComplex(-imag, real)); + return (FloatComplex(cimag(result), -creal(result))); return z; } diff --git a/src/elementaryFunctions/tanh/ztanhs.c b/src/elementaryFunctions/tanh/ztanhs.c index 0e11adfb..3c2498a7 100644 --- a/src/elementaryFunctions/tanh/ztanhs.c +++ b/src/elementaryFunctions/tanh/ztanhs.c @@ -5,14 +5,20 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Wed Jan 31 10:56:10 2007 jofret +** Last update Tue Feb 13 10:47:24 2007 jofret ** ** Copyright INRIA 2006 */ #include "doubleComplex.h" +doubleComplex ztans(doubleComplex); + doubleComplex ztanhs(doubleComplex z) { - /* FIXME: Dummy... */ + double real = creal(z); + double imag = cimag(z); + + doubleComplex result = ztans(DoubleComplex(-imag, real)); + return (DoubleComplex(cimag(result), -creal(result))); return (DoubleComplex(0,1)); } |