summaryrefslogtreecommitdiff
path: root/src/elementaryFunctions/exp
diff options
context:
space:
mode:
Diffstat (limited to 'src/elementaryFunctions/exp')
-rw-r--r--src/elementaryFunctions/exp/Makefile10
-rw-r--r--src/elementaryFunctions/exp/cexpa.c6
-rw-r--r--src/elementaryFunctions/exp/cexps.c14
-rw-r--r--src/elementaryFunctions/exp/dexpa.c4
-rw-r--r--src/elementaryFunctions/exp/exp.h57
-rw-r--r--src/elementaryFunctions/exp/sexpa.c4
-rw-r--r--src/elementaryFunctions/exp/zexpa.c6
-rw-r--r--src/elementaryFunctions/exp/zexps.c14
8 files changed, 25 insertions, 90 deletions
diff --git a/src/elementaryFunctions/exp/Makefile b/src/elementaryFunctions/exp/Makefile
index 8738b977..3b0e8495 100644
--- a/src/elementaryFunctions/exp/Makefile
+++ b/src/elementaryFunctions/exp/Makefile
@@ -5,7 +5,7 @@
## Made by Bruno JOFRET <bruno.jofret@inria.fr>
##
## Started on Thu Nov 30 16:33:40 2006 jofret
-## Last update Wed Jan 31 11:59:06 2007 jofret
+## Last update Fri Feb 23 17:05:56 2007 jofret
##
## Copyright INRIA 2006
##
@@ -14,9 +14,9 @@ NAME = ../../lib/libExp.a
RM = rm -f
CC = gcc
-INCLUDE = ../../type
-LINK = ../../lib
-CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD)
+INCLUDE = -I ../../type -I ../includes
+LINK = -L ../../lib
+CFLAGS = -Werror -Wall -pedantic -ansi $(INCLUDE) $(LINK) $(STANDARD)
AR = ar cru
RANLIB = ranlib
@@ -29,7 +29,7 @@ SRC = sexps.c \
cexpa.c \
zexpa.c
-HEAD = exp.h
+HEAD = ../includes/exp.h
OBJ = $(SRC:.c=.o)
all: $(NAME)
diff --git a/src/elementaryFunctions/exp/cexpa.c b/src/elementaryFunctions/exp/cexpa.c
index eec3a98c..090124fe 100644
--- a/src/elementaryFunctions/exp/cexpa.c
+++ b/src/elementaryFunctions/exp/cexpa.c
@@ -5,14 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 14:54:24 2006 jofret
-** Last update Wed Jan 31 11:13:51 2007 jofret
+** Last update Fri Feb 23 17:05:25 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "floatComplex.h"
-
-floatComplex cexps(floatComplex);
+#include "exp.h"
void cexpa(floatComplex* x, int strideX, floatComplex* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/exp/cexps.c b/src/elementaryFunctions/exp/cexps.c
index 13b839aa..667c29d0 100644
--- a/src/elementaryFunctions/exp/cexps.c
+++ b/src/elementaryFunctions/exp/cexps.c
@@ -5,20 +5,18 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 12:04:28 2006 jofret
-** Last update Fri Feb 9 17:00:38 2007 jofret
+** Last update Fri Feb 23 17:08:27 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "floatComplex.h"
-
-float sexps(float);
-float scoss(float);
-float ssins(float);
+#include "exp.h"
+#include "cos.h"
+#include "sin.h"
floatComplex cexps(floatComplex z) {
- float real = creal(z);
- float imag = cimag(z);
+ float real = creals(z);
+ float imag = cimags(z);
return FloatComplex(sexps(real)*scoss(imag),
sexps(real)*ssins(imag));
diff --git a/src/elementaryFunctions/exp/dexpa.c b/src/elementaryFunctions/exp/dexpa.c
index 8d80ea06..45785e90 100644
--- a/src/elementaryFunctions/exp/dexpa.c
+++ b/src/elementaryFunctions/exp/dexpa.c
@@ -5,12 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 14:54:56 2006 jofret
-** Last update Wed Jan 31 09:20:51 2007 jofret
+** Last update Fri Feb 23 17:04:43 2007 jofret
**
** Copyright INRIA 2006
*/
-double dexps(double);
+#include "exp.h"
void dexpa(double* x, int strideX, double* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/exp/exp.h b/src/elementaryFunctions/exp/exp.h
deleted file mode 100644
index ed2aa79d..00000000
--- a/src/elementaryFunctions/exp/exp.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-** -*- C -*-
-**
-** exp.h
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Tue Dec 5 15:49:18 2006 jofret
-** Last update Wed Jan 31 09:07:56 2007 jofret
-**
-** Copyright INRIA 2006
-*/
-
-/*
-** Compute Exponential for different types .
-*/
-
-/*
-** \brief Float Exponential function
-*/
-float sexps(float);
-
-/*
-** \brief Double Exponential function
-*/
-double dexps(double);
-
-/*
-** \brief Float Complex Exponential function
-*/
-floatComplex cexps(floatComplex);
-
-/*
-** \brief Double Complex Exponential function
-*/
-doubleComplex zexps(doubleComplex);
-
-/*
-** \brief Float Matrix Exponential function
-*/
-void sexpa(float*, int, float*, int, int);
-
-/*
-** \brief Double Matrix Exponential function
-*/
-void dexpa(double*, int, double*, int, int);
-
-/*
-** \brief Float Complex Matrix Exponential function
-*/
-void cexpa(floatComplex*, int, floatComplex*, int, int);
-
-/*
-** \brief Double Complex Matrix Exponential function
-*/
-void zexpa(doubleComplex*, int, doubleComplex*, int, int);
-
-
diff --git a/src/elementaryFunctions/exp/sexpa.c b/src/elementaryFunctions/exp/sexpa.c
index fe7d0a2e..7b89eb50 100644
--- a/src/elementaryFunctions/exp/sexpa.c
+++ b/src/elementaryFunctions/exp/sexpa.c
@@ -5,12 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 16:03:27 2006 jofret
-** Last update Wed Jan 31 09:20:32 2007 jofret
+** Last update Fri Feb 23 17:04:29 2007 jofret
**
** Copyright INRIA 2006
*/
-float sexps(float);
+#include "exp.h"
void sexpa(float* x, int strideX, float* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/exp/zexpa.c b/src/elementaryFunctions/exp/zexpa.c
index a22f381c..05a0b89f 100644
--- a/src/elementaryFunctions/exp/zexpa.c
+++ b/src/elementaryFunctions/exp/zexpa.c
@@ -5,14 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 16:12:02 2006 jofret
-** Last update Wed Jan 31 11:13:29 2007 jofret
+** Last update Fri Feb 23 17:04:17 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "doubleComplex.h"
-
-doubleComplex zexps(doubleComplex);
+#include "exp.h"
void zexpa(doubleComplex* x, int strideX, doubleComplex* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/exp/zexps.c b/src/elementaryFunctions/exp/zexps.c
index fac6746d..91babc61 100644
--- a/src/elementaryFunctions/exp/zexps.c
+++ b/src/elementaryFunctions/exp/zexps.c
@@ -5,20 +5,18 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 12:05:48 2006 jofret
-** Last update Fri Feb 9 17:01:19 2007 jofret
+** Last update Fri Feb 23 17:08:38 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "doubleComplex.h"
-
-double dexps(double);
-double dcoss(double);
-double dsins(double);
+#include "exp.h"
+#include "cos.h"
+#include "sin.h"
doubleComplex zexps(doubleComplex z) {
- double real = creal(z);
- double imag = cimag(z);
+ double real = zreals(z);
+ double imag = zimags(z);
return DoubleComplex(dexps(real)*dcoss(imag),
dexps(real)*dsins(imag));