diff options
author | jofret | 2007-01-31 16:37:34 +0000 |
---|---|---|
committer | jofret | 2007-01-31 16:37:34 +0000 |
commit | 1f2b1f49842a9a788303ef48bbc4e39eb4fa058c (patch) | |
tree | 330fe1efb8152d784c04ac9c822c690f370dd720 /src/elementaryFunctions | |
parent | 170334ed9128da4a2f916d88ba52db0988e1d119 (diff) | |
download | scilab2c-1f2b1f49842a9a788303ef48bbc4e39eb4fa058c.tar.gz scilab2c-1f2b1f49842a9a788303ef48bbc4e39eb4fa058c.tar.bz2 scilab2c-1f2b1f49842a9a788303ef48bbc4e39eb4fa058c.zip |
* src/elementaryFunctions/*.c :
Remove Multi Complex definition.
* src/type/doubleComplex.h :
Used as C99 Complex interface or hand-made complex.
* src/type/floatComplex.h :
Used as C99 Complex interface or hand-made complex.
* src/*/Makefile :
Add -std=c99 flag for native c99 complex compilation.
* src/elementaryFunctions/exp :
Exponential functions.
* src/test/testExp.c :
Add some Exponential functions tests.
Diffstat (limited to 'src/elementaryFunctions')
52 files changed, 310 insertions, 229 deletions
diff --git a/src/elementaryFunctions/Makefile b/src/elementaryFunctions/Makefile index 2e505d6f..73e2c6b6 100644 --- a/src/elementaryFunctions/Makefile +++ b/src/elementaryFunctions/Makefile @@ -5,7 +5,7 @@ ## Made by Bruno JOFRET <bruno.jofret@inria.fr> ## ## Started on Tue Dec 5 09:19:53 2006 jofret -## Last update Mon Jan 29 17:06:19 2007 jofret +## Last update Wed Jan 31 09:22:09 2007 jofret ## ## Copyright INRIA 2006 ## @@ -17,8 +17,8 @@ DIRS = cos \ cosh \ sinh \ tan \ - tanh #\ -# exp \ + tanh \ + exp #\ # log all: recure diff --git a/src/elementaryFunctions/acos/Makefile b/src/elementaryFunctions/acos/Makefile index aa981c04..78456138 100644 --- a/src/elementaryFunctions/acos/Makefile +++ b/src/elementaryFunctions/acos/Makefile @@ -5,7 +5,7 @@ ## Made by Bruno JOFRET <bruno.jofret@inria.fr> ## ## Started on Fri Jan 5 10:19:16 2007 jofret -## Last update Fri Jan 5 16:07:42 2007 jofret +## Last update Wed Jan 31 11:59:19 2007 jofret ## ## Copyright INRIA 2007 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/acos/cacosa.c b/src/elementaryFunctions/acos/cacosa.c index da1f5b69..3db39792 100644 --- a/src/elementaryFunctions/acos/cacosa.c +++ b/src/elementaryFunctions/acos/cacosa.c @@ -5,19 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:23:49 2007 jofret -** Last update Fri Jan 5 10:24:21 2007 jofret +** Last update Wed Jan 31 11:16:23 2007 jofret ** ** Copyright INRIA 2007 */ - - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex cacoss(floatComplex); diff --git a/src/elementaryFunctions/acos/cacoss.c b/src/elementaryFunctions/acos/cacoss.c index 480b41e6..61a90bd3 100644 --- a/src/elementaryFunctions/acos/cacoss.c +++ b/src/elementaryFunctions/acos/cacoss.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 11:29:45 2007 jofret -** Last update Fri Jan 5 11:29:55 2007 jofret +** Last update Wed Jan 31 11:16:14 2007 jofret ** ** Copyright INRIA 2007 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex cacoss(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/acos/zacosa.c b/src/elementaryFunctions/acos/zacosa.c index e8c5387d..3bad836c 100644 --- a/src/elementaryFunctions/acos/zacosa.c +++ b/src/elementaryFunctions/acos/zacosa.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:25:14 2007 jofret -** Last update Fri Jan 5 10:25:34 2007 jofret +** Last update Wed Jan 31 11:15:58 2007 jofret ** ** Copyright INRIA 2007 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zacoss(doubleComplex); diff --git a/src/elementaryFunctions/acos/zacoss.c b/src/elementaryFunctions/acos/zacoss.c index 1b197905..8cbc4c60 100644 --- a/src/elementaryFunctions/acos/zacoss.c +++ b/src/elementaryFunctions/acos/zacoss.c @@ -5,19 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:24:38 2007 jofret -** Last update Fri Jan 5 10:25:02 2007 jofret +** Last update Wed Jan 31 11:15:51 2007 jofret ** ** Copyright INRIA 2007 */ - -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex zacoss(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/asin/Makefile b/src/elementaryFunctions/asin/Makefile index adeafc2b..01f11596 100644 --- a/src/elementaryFunctions/asin/Makefile +++ b/src/elementaryFunctions/asin/Makefile @@ -5,7 +5,7 @@ ## Made by Bruno JOFRET <bruno.jofret@inria.fr> ## ## Started on Fri Jan 5 10:19:16 2007 jofret -## Last update Fri Jan 5 16:13:51 2007 jofret +## Last update Wed Jan 31 11:59:14 2007 jofret ## ## Copyright INRIA 2007 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/asin/casina.c b/src/elementaryFunctions/asin/casina.c index 8cbec360..c9493012 100644 --- a/src/elementaryFunctions/asin/casina.c +++ b/src/elementaryFunctions/asin/casina.c @@ -5,19 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:23:49 2007 jofret -** Last update Fri Jan 5 16:24:19 2007 jofret +** Last update Wed Jan 31 11:15:40 2007 jofret ** ** Copyright INRIA 2007 */ - - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex casins(floatComplex); diff --git a/src/elementaryFunctions/asin/casins.c b/src/elementaryFunctions/asin/casins.c index 32cfbd59..fa668316 100644 --- a/src/elementaryFunctions/asin/casins.c +++ b/src/elementaryFunctions/asin/casins.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 11:29:45 2007 jofret -** Last update Fri Jan 5 16:24:08 2007 jofret +** Last update Wed Jan 31 11:15:31 2007 jofret ** ** Copyright INRIA 2007 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex casins(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/asin/sasina.c b/src/elementaryFunctions/asin/sasina.c index 2b38a409..9cc177d4 100644 --- a/src/elementaryFunctions/asin/sasina.c +++ b/src/elementaryFunctions/asin/sasina.c @@ -5,12 +5,11 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:25:57 2007 jofret -** Last update Fri Jan 5 16:23:34 2007 jofret +** Last update Wed Jan 31 11:15:18 2007 jofret ** ** Copyright INRIA 2007 */ - float sasins(float); void sasina(float* x, int strideX, float* y, int strideY, int size) { diff --git a/src/elementaryFunctions/asin/zasina.c b/src/elementaryFunctions/asin/zasina.c index c9e13f2d..b3dc3603 100644 --- a/src/elementaryFunctions/asin/zasina.c +++ b/src/elementaryFunctions/asin/zasina.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:25:14 2007 jofret -** Last update Fri Jan 5 16:23:01 2007 jofret +** Last update Wed Jan 31 11:15:10 2007 jofret ** ** Copyright INRIA 2007 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zasins(doubleComplex); diff --git a/src/elementaryFunctions/asin/zasins.c b/src/elementaryFunctions/asin/zasins.c index 9ffed91f..30bf7a9f 100644 --- a/src/elementaryFunctions/asin/zasins.c +++ b/src/elementaryFunctions/asin/zasins.c @@ -5,19 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Jan 5 10:24:38 2007 jofret -** Last update Fri Jan 5 16:22:49 2007 jofret +** Last update Wed Jan 31 11:15:02 2007 jofret ** ** Copyright INRIA 2007 */ - -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex zasins(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/cos/Makefile b/src/elementaryFunctions/cos/Makefile index 0c18a80f..118716cc 100644 --- a/src/elementaryFunctions/cos/Makefile +++ b/src/elementaryFunctions/cos/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 Thu Dec 7 15:25:32 2006 jofret +## Last update Wed Jan 31 11:57:33 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/cos/ccosa.c b/src/elementaryFunctions/cos/ccosa.c index 9859ea3d..4c49b29b 100644 --- a/src/elementaryFunctions/cos/ccosa.c +++ b/src/elementaryFunctions/cos/ccosa.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 14:54:24 2006 jofret -** Last update Thu Dec 7 17:15:29 2006 jofret +** Last update Wed Jan 31 11:14:50 2007 jofret ** ** Copyright INRIA 2006 */ - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ccoss(floatComplex); diff --git a/src/elementaryFunctions/cos/ccoss.c b/src/elementaryFunctions/cos/ccoss.c index 8162d102..79c18fb4 100644 --- a/src/elementaryFunctions/cos/ccoss.c +++ b/src/elementaryFunctions/cos/ccoss.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Fri Dec 8 12:05:56 2006 jofret +** Last update Wed Jan 31 10:19:53 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ccoss(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/cos/zcosa.c b/src/elementaryFunctions/cos/zcosa.c index 9e76b850..525c04d5 100644 --- a/src/elementaryFunctions/cos/zcosa.c +++ b/src/elementaryFunctions/cos/zcosa.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 16:12:02 2006 jofret -** Last update Thu Dec 7 17:18:38 2006 jofret +** Last update Wed Jan 31 10:19:21 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zcoss(doubleComplex); diff --git a/src/elementaryFunctions/cos/zcoss.c b/src/elementaryFunctions/cos/zcoss.c index b921a9c9..f12391de 100644 --- a/src/elementaryFunctions/cos/zcoss.c +++ b/src/elementaryFunctions/cos/zcoss.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Thu Dec 7 16:43:16 2006 jofret +** Last update Wed Jan 31 10:19:12 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex zcoss(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/cosh/Makefile b/src/elementaryFunctions/cosh/Makefile index 66c22a5f..6bdb078e 100644 --- a/src/elementaryFunctions/cosh/Makefile +++ b/src/elementaryFunctions/cosh/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 Fri Jan 19 14:54:57 2007 jofret +## Last update Wed Jan 31 11:59:11 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/cosh/ccosha.c b/src/elementaryFunctions/cosh/ccosha.c index 7d3f0ba5..7de4fd4d 100644 --- a/src/elementaryFunctions/cosh/ccosha.c +++ b/src/elementaryFunctions/cosh/ccosha.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 14:54:24 2006 jofret -** Last update Fri Jan 19 14:55:22 2007 jofret +** Last update Wed Jan 31 11:14:37 2007 jofret ** ** Copyright INRIA 2006 */ - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ccoshs(floatComplex); diff --git a/src/elementaryFunctions/cosh/ccoshs.c b/src/elementaryFunctions/cosh/ccoshs.c index d6dfa47c..bfeac33a 100644 --- a/src/elementaryFunctions/cosh/ccoshs.c +++ b/src/elementaryFunctions/cosh/ccoshs.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Fri Jan 19 14:56:26 2007 jofret +** Last update Wed Jan 31 11:14:28 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ccoshs(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/cosh/zcosha.c b/src/elementaryFunctions/cosh/zcosha.c index 05ba2487..fdfe3d3c 100644 --- a/src/elementaryFunctions/cosh/zcosha.c +++ b/src/elementaryFunctions/cosh/zcosha.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 16:12:02 2006 jofret -** Last update Fri Jan 19 14:53:42 2007 jofret +** Last update Wed Jan 31 11:14:15 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zcoshs(doubleComplex); diff --git a/src/elementaryFunctions/cosh/zcoshs.c b/src/elementaryFunctions/cosh/zcoshs.c index 05697977..c9436928 100644 --- a/src/elementaryFunctions/cosh/zcoshs.c +++ b/src/elementaryFunctions/cosh/zcoshs.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Fri Jan 19 14:53:12 2007 jofret +** Last update Wed Jan 31 11:14:07 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex zcoshs(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/exp/Makefile b/src/elementaryFunctions/exp/Makefile new file mode 100644 index 00000000..8738b977 --- /dev/null +++ b/src/elementaryFunctions/exp/Makefile @@ -0,0 +1,47 @@ +## +## -*- makefile -*- +## +## Makefile +## 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 +## +## Copyright INRIA 2006 +## + +NAME = ../../lib/libExp.a + +RM = rm -f +CC = gcc +INCLUDE = ../../type +LINK = ../../lib +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) +AR = ar cru +RANLIB = ranlib + +SRC = sexps.c \ + dexps.c \ + cexps.c \ + zexps.c \ + sexpa.c \ + dexpa.c \ + cexpa.c \ + zexpa.c + +HEAD = exp.h +OBJ = $(SRC:.c=.o) + +all: $(NAME) + +$(NAME) : $(HEAD) $(OBJ) + $(AR) $@ $(OBJ) + $(RANLIB) $@ + +clean: + $(RM) $(OBJ) + +distclean: clean + $(RM) $(NAME) + +re: clean all diff --git a/src/elementaryFunctions/exp/cexpa.c b/src/elementaryFunctions/exp/cexpa.c new file mode 100644 index 00000000..eec3a98c --- /dev/null +++ b/src/elementaryFunctions/exp/cexpa.c @@ -0,0 +1,22 @@ +/* +** -*- C -*- +** +** cexpa.c +** 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 +** +** Copyright INRIA 2006 +*/ + +#include "floatComplex.h" + +floatComplex cexps(floatComplex); + +void cexpa(floatComplex* x, int strideX, floatComplex* y, int strideY, int size) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cexps(x[i]); + } +} diff --git a/src/elementaryFunctions/exp/cexps.c b/src/elementaryFunctions/exp/cexps.c new file mode 100644 index 00000000..23863f4d --- /dev/null +++ b/src/elementaryFunctions/exp/cexps.c @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** cexps.c +** 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 +** +** Copyright INRIA 2006 +*/ + +#include "floatComplex.h" + +floatComplex cexps(floatComplex z) { + /* FIXME: Dummy... */ + return z; +} diff --git a/src/elementaryFunctions/exp/dexpa.c b/src/elementaryFunctions/exp/dexpa.c new file mode 100644 index 00000000..8d80ea06 --- /dev/null +++ b/src/elementaryFunctions/exp/dexpa.c @@ -0,0 +1,20 @@ +/* +** -*- C -*- +** +** dexpa.c +** 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 +** +** Copyright INRIA 2006 +*/ + +double dexps(double); + +void dexpa(double* x, int strideX, double* y, int strideY, int size) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dexps(x[i]); + } +} diff --git a/src/elementaryFunctions/exp/dexps.c b/src/elementaryFunctions/exp/dexps.c new file mode 100644 index 00000000..952cf0e2 --- /dev/null +++ b/src/elementaryFunctions/exp/dexps.c @@ -0,0 +1,17 @@ +/* +** -*- C -*- +** +** dexps.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Dec 7 12:02:41 2006 jofret +** Last update Wed Jan 31 09:20:40 2007 jofret +** +** Copyright INRIA 2006 +*/ + +#include <math.h> + +double dexps(double x) { + return (exp(x)); +} diff --git a/src/elementaryFunctions/exp/exp.h b/src/elementaryFunctions/exp/exp.h new file mode 100644 index 00000000..ed2aa79d --- /dev/null +++ b/src/elementaryFunctions/exp/exp.h @@ -0,0 +1,57 @@ +/* +** -*- 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 new file mode 100644 index 00000000..fe7d0a2e --- /dev/null +++ b/src/elementaryFunctions/exp/sexpa.c @@ -0,0 +1,20 @@ +/* +** -*- C -*- +** +** sexpa.c +** 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 +** +** Copyright INRIA 2006 +*/ + +float sexps(float); + +void sexpa(float* x, int strideX, float* y, int strideY, int size) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sexps(x[i]); + } +} diff --git a/src/elementaryFunctions/exp/sexps.c b/src/elementaryFunctions/exp/sexps.c new file mode 100644 index 00000000..f8f8e8d3 --- /dev/null +++ b/src/elementaryFunctions/exp/sexps.c @@ -0,0 +1,17 @@ +/* +** -*- C -*- +** +** sexps.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Dec 7 11:05:37 2006 jofret +** Last update Wed Jan 31 09:20:21 2007 jofret +** +** Copyright INRIA 2006 +*/ + +#include <math.h> + +float sexps(float x) { + return (exp(x)); +} diff --git a/src/elementaryFunctions/exp/zexpa.c b/src/elementaryFunctions/exp/zexpa.c new file mode 100644 index 00000000..a22f381c --- /dev/null +++ b/src/elementaryFunctions/exp/zexpa.c @@ -0,0 +1,22 @@ +/* +** -*- C -*- +** +** zexpa.c +** 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 +** +** Copyright INRIA 2006 +*/ + +#include "doubleComplex.h" + +doubleComplex zexps(doubleComplex); + +void zexpa(doubleComplex* x, int strideX, doubleComplex* y, int strideY, int size) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zexps(x[i]); + } +} diff --git a/src/elementaryFunctions/exp/zexps.c b/src/elementaryFunctions/exp/zexps.c new file mode 100644 index 00000000..5ee39ac9 --- /dev/null +++ b/src/elementaryFunctions/exp/zexps.c @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** zexps.c +** 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 +** +** Copyright INRIA 2006 +*/ + +#include "doubleComplex.h" + +doubleComplex zexps(doubleComplex z) { + /* FIXME: Dummy... */ + return (DoubleComplex(0,1)); +} diff --git a/src/elementaryFunctions/sin/Makefile b/src/elementaryFunctions/sin/Makefile index b37931d5..1cfcc0fd 100644 --- a/src/elementaryFunctions/sin/Makefile +++ b/src/elementaryFunctions/sin/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 Fri Dec 8 16:38:48 2006 jofret +## Last update Wed Jan 31 11:58:56 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/sin/csina.c b/src/elementaryFunctions/sin/csina.c index 76e669dc..6c458c8e 100644 --- a/src/elementaryFunctions/sin/csina.c +++ b/src/elementaryFunctions/sin/csina.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 13:07:37 2006 jofret -** Last update Fri Dec 8 14:01:46 2006 jofret +** Last update Wed Jan 31 11:13:10 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex csins(floatComplex); diff --git a/src/elementaryFunctions/sin/csins.c b/src/elementaryFunctions/sin/csins.c index 0b9ff889..eb6cab04 100644 --- a/src/elementaryFunctions/sin/csins.c +++ b/src/elementaryFunctions/sin/csins.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 12:04:39 2006 jofret -** Last update Fri Dec 8 13:11:14 2006 jofret +** Last update Wed Jan 31 11:13:02 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex csins(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/sin/zsina.c b/src/elementaryFunctions/sin/zsina.c index 838487d4..87c72535 100644 --- a/src/elementaryFunctions/sin/zsina.c +++ b/src/elementaryFunctions/sin/zsina.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 14:02:04 2006 jofret -** Last update Fri Dec 8 14:04:27 2006 jofret +** Last update Wed Jan 31 11:12:12 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zsins(doubleComplex); diff --git a/src/elementaryFunctions/sin/zsins.c b/src/elementaryFunctions/sin/zsins.c index 80544ea9..c256db48 100644 --- a/src/elementaryFunctions/sin/zsins.c +++ b/src/elementaryFunctions/sin/zsins.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 12:06:35 2006 jofret -** Last update Fri Dec 8 13:02:34 2006 jofret +** Last update Wed Jan 31 11:12:02 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zsins(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/sinh/Makefile b/src/elementaryFunctions/sinh/Makefile index 1841fc26..97e5fa2d 100644 --- a/src/elementaryFunctions/sinh/Makefile +++ b/src/elementaryFunctions/sinh/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 Fri Jan 19 15:20:12 2007 jofret +## Last update Wed Jan 31 11:59:02 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/sinh/csinha.c b/src/elementaryFunctions/sinh/csinha.c index e55292de..1e271767 100644 --- a/src/elementaryFunctions/sinh/csinha.c +++ b/src/elementaryFunctions/sinh/csinha.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 13:07:37 2006 jofret -** Last update Fri Jan 19 15:20:58 2007 jofret +** Last update Wed Jan 31 11:12:52 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex csinhs(floatComplex); diff --git a/src/elementaryFunctions/sinh/csinhs.c b/src/elementaryFunctions/sinh/csinhs.c index 6bac5cb3..4cac792b 100644 --- a/src/elementaryFunctions/sinh/csinhs.c +++ b/src/elementaryFunctions/sinh/csinhs.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 12:04:39 2006 jofret -** Last update Fri Jan 19 15:20:48 2007 jofret +** Last update Wed Jan 31 11:12:44 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex csinhs(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/sinh/zsinha.c b/src/elementaryFunctions/sinh/zsinha.c index a7488378..730baf1a 100644 --- a/src/elementaryFunctions/sinh/zsinha.c +++ b/src/elementaryFunctions/sinh/zsinha.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 14:02:04 2006 jofret -** Last update Fri Jan 19 15:18:16 2007 jofret +** Last update Wed Jan 31 11:12:30 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zsinhs(doubleComplex); diff --git a/src/elementaryFunctions/sinh/zsinhs.c b/src/elementaryFunctions/sinh/zsinhs.c index 6820fb39..7fc3b23f 100644 --- a/src/elementaryFunctions/sinh/zsinhs.c +++ b/src/elementaryFunctions/sinh/zsinhs.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Fri Dec 8 12:06:35 2006 jofret -** Last update Fri Jan 19 15:18:06 2007 jofret +** Last update Wed Jan 31 11:12:22 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex zsinhs(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/tan/Makefile b/src/elementaryFunctions/tan/Makefile index 3f22534d..7e216db8 100644 --- a/src/elementaryFunctions/tan/Makefile +++ b/src/elementaryFunctions/tan/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 Mon Jan 29 16:08:57 2007 jofret +## Last update Wed Jan 31 11:58:47 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/tan/ctana.c b/src/elementaryFunctions/tan/ctana.c index 77a6df0c..4cbf11cb 100644 --- a/src/elementaryFunctions/tan/ctana.c +++ b/src/elementaryFunctions/tan/ctana.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 14:54:24 2006 jofret -** Last update Mon Jan 29 16:12:36 2007 jofret +** Last update Wed Jan 31 11:11:52 2007 jofret ** ** Copyright INRIA 2006 */ - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ctans(floatComplex); diff --git a/src/elementaryFunctions/tan/ctans.c b/src/elementaryFunctions/tan/ctans.c index a1d4a81e..c6795c7e 100644 --- a/src/elementaryFunctions/tan/ctans.c +++ b/src/elementaryFunctions/tan/ctans.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Mon Jan 29 16:12:26 2007 jofret +** Last update Wed Jan 31 11:11:43 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ctans(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/tan/ztana.c b/src/elementaryFunctions/tan/ztana.c index a815e58b..91e05fb5 100644 --- a/src/elementaryFunctions/tan/ztana.c +++ b/src/elementaryFunctions/tan/ztana.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 16:12:02 2006 jofret -** Last update Mon Jan 29 16:11:17 2007 jofret +** Last update Wed Jan 31 10:55:53 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex ztans(doubleComplex); diff --git a/src/elementaryFunctions/tan/ztans.c b/src/elementaryFunctions/tan/ztans.c index 9c37fdc5..b15ad177 100644 --- a/src/elementaryFunctions/tan/ztans.c +++ b/src/elementaryFunctions/tan/ztans.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Mon Jan 29 16:10:46 2007 jofret +** Last update Wed Jan 31 10:55:44 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex ztans(doubleComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/tanh/Makefile b/src/elementaryFunctions/tanh/Makefile index 81c83d42..1da672a6 100644 --- a/src/elementaryFunctions/tanh/Makefile +++ b/src/elementaryFunctions/tanh/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 Mon Jan 29 16:46:38 2007 jofret +## Last update Wed Jan 31 11:58:52 2007 jofret ## ## Copyright INRIA 2006 ## @@ -16,7 +16,7 @@ RM = rm -f CC = gcc INCLUDE = ../../type LINK = ../../lib -CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) +CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD) AR = ar cru RANLIB = ranlib diff --git a/src/elementaryFunctions/tanh/ctanha.c b/src/elementaryFunctions/tanh/ctanha.c index 5224de9c..86871d97 100644 --- a/src/elementaryFunctions/tanh/ctanha.c +++ b/src/elementaryFunctions/tanh/ctanha.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 14:54:24 2006 jofret -** Last update Mon Jan 29 17:05:40 2007 jofret +** Last update Wed Jan 31 11:11:30 2007 jofret ** ** Copyright INRIA 2006 */ - -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ctanhs(floatComplex); diff --git a/src/elementaryFunctions/tanh/ctanhs.c b/src/elementaryFunctions/tanh/ctanhs.c index 8eb8e6ee..6eb84827 100644 --- a/src/elementaryFunctions/tanh/ctanhs.c +++ b/src/elementaryFunctions/tanh/ctanhs.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Mon Jan 29 17:05:27 2007 jofret +** Last update Wed Jan 31 10:56:39 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "floatComplex.h" -#else -#include <complex.h> -typedef float complex floatComplex; -#endif floatComplex ctanhs(floatComplex z) { /* FIXME: Dummy... */ diff --git a/src/elementaryFunctions/tanh/ztanha.c b/src/elementaryFunctions/tanh/ztanha.c index 36aaeb38..ff22d6a9 100644 --- a/src/elementaryFunctions/tanh/ztanha.c +++ b/src/elementaryFunctions/tanh/ztanha.c @@ -5,17 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 16:12:02 2006 jofret -** Last update Mon Jan 29 17:04:42 2007 jofret +** Last update Wed Jan 31 10:56:20 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif doubleComplex ztanhs(doubleComplex); diff --git a/src/elementaryFunctions/tanh/ztanhs.c b/src/elementaryFunctions/tanh/ztanhs.c index aad50c83..0e11adfb 100644 --- a/src/elementaryFunctions/tanh/ztanhs.c +++ b/src/elementaryFunctions/tanh/ztanhs.c @@ -5,18 +5,12 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:05:48 2006 jofret -** Last update Mon Jan 29 17:04:29 2007 jofret +** Last update Wed Jan 31 10:56:10 2007 jofret ** ** Copyright INRIA 2006 */ -#ifndef STDC99 #include "doubleComplex.h" -#else -#include <complex.h> -typedef double complex doubleComplex; -#endif - doubleComplex ztanhs(doubleComplex z) { /* FIXME: Dummy... */ |