diff options
author | jofret | 2007-02-09 16:13:04 +0000 |
---|---|---|
committer | jofret | 2007-02-09 16:13:04 +0000 |
commit | 2a3a1e826511ed5f7dc447efcb5dcf40b36e0f92 (patch) | |
tree | 0c3f7501cbaae577e17571ab39aa30df4bbe7f6d | |
parent | 63d48516352b5714023bb536c16f553518bfb5e8 (diff) | |
download | scilab2c-2a3a1e826511ed5f7dc447efcb5dcf40b36e0f92.tar.gz scilab2c-2a3a1e826511ed5f7dc447efcb5dcf40b36e0f92.tar.bz2 scilab2c-2a3a1e826511ed5f7dc447efcb5dcf40b36e0f92.zip |
* src/elementaryFunctions/cexps.c :
Implementation.
* src/elementaryFunctions/zexps.c :
Implementation.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/elementaryFunctions/exp/cexps.c | 13 | ||||
-rw-r--r-- | src/elementaryFunctions/exp/zexps.c | 13 |
3 files changed, 27 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2007-02-09 Bruno JOFRET <bruno.jofret@inria.fr> + + * src/elementaryFunctions/cexps.c : + Implementation. + * src/elementaryFunctions/zexps.c : + Implementation. + 2007-02-08 Bruno JOFRET <bruno.jofret@inria.fr> * src/auxiliaryFunctions/sign : diff --git a/src/elementaryFunctions/exp/cexps.c b/src/elementaryFunctions/exp/cexps.c index 23863f4d..13b839aa 100644 --- a/src/elementaryFunctions/exp/cexps.c +++ b/src/elementaryFunctions/exp/cexps.c @@ -5,14 +5,21 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Wed Jan 31 11:13:43 2007 jofret +** Last update Fri Feb 9 17:00:38 2007 jofret ** ** Copyright INRIA 2006 */ #include "floatComplex.h" +float sexps(float); +float scoss(float); +float ssins(float); + floatComplex cexps(floatComplex z) { - /* FIXME: Dummy... */ - return z; + float real = creal(z); + float imag = cimag(z); + + return FloatComplex(sexps(real)*scoss(imag), + sexps(real)*ssins(imag)); } diff --git a/src/elementaryFunctions/exp/zexps.c b/src/elementaryFunctions/exp/zexps.c index 5ee39ac9..fac6746d 100644 --- a/src/elementaryFunctions/exp/zexps.c +++ b/src/elementaryFunctions/exp/zexps.c @@ -5,14 +5,21 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Wed Jan 31 11:13:19 2007 jofret +** Last update Fri Feb 9 17:01:19 2007 jofret ** ** Copyright INRIA 2006 */ #include "doubleComplex.h" +double dexps(double); +double dcoss(double); +double dsins(double); + doubleComplex zexps(doubleComplex z) { - /* FIXME: Dummy... */ - return (DoubleComplex(0,1)); + double real = creal(z); + double imag = cimag(z); + + return DoubleComplex(dexps(real)*dcoss(imag), + dexps(real)*dsins(imag)); } |