diff options
author | jofret | 2007-02-13 16:14:33 +0000 |
---|---|---|
committer | jofret | 2007-02-13 16:14:33 +0000 |
commit | 85c7a2e39d24c29a079a47e5c75e88c468756e5d (patch) | |
tree | 9c117457508ef57ffbca9d1a02aab2c2af65976d | |
parent | cd57b12f621082f87255daf100a66eb01e5ae1d7 (diff) | |
download | scilab2c-85c7a2e39d24c29a079a47e5c75e88c468756e5d.tar.gz scilab2c-85c7a2e39d24c29a079a47e5c75e88c468756e5d.tar.bz2 scilab2c-85c7a2e39d24c29a079a47e5c75e88c468756e5d.zip |
* src/elementaryFunctions/tanh/ztanhs.c :
Fixed with C99 Complex but Scilab computation.
* src/elementaryFunctions/tanh/ctanhs.c :
Fixed with C99 Complex but Scilab computation.
* src/auxiliaryFunctions/find :
Find not null element in list.
* src/auxiliaryFunctions/find/{sdcz}finda.c :
Implementation : s(float) d(double)
c(floatComplex) z(doubleComplex)
* src/auxiliaryFunctions/find/find.h :
Interface.
* src/auxiliaryFunctions/find/notFound.h :
Constant if all elements are not null.
Adding some other functions.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | TODO | 5 | ||||
-rw-r--r-- | src/auxiliaryFunctions/Makefile | 10 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/Makefile | 43 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/cfinda.c | 18 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/dfinda.c | 18 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/find.h | 35 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/notFound.h | 18 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/sfinda.c | 19 | ||||
-rw-r--r-- | src/auxiliaryFunctions/find/zfinda.c | 19 | ||||
-rw-r--r-- | src/elementaryFunctions/tan/ctans.c | 4 | ||||
-rw-r--r-- | src/elementaryFunctions/tanh/ctanhs.c | 10 | ||||
-rw-r--r-- | src/elementaryFunctions/tanh/ztanhs.c | 10 |
13 files changed, 216 insertions, 9 deletions
@@ -1,3 +1,19 @@ +2007-02-13 Bruno JOFRET <bruno.jofret@inria.fr> + + * src/elementaryFunctions/tanh/ztanhs.c : + Fixed with C99 Complex but Scilab computation. + * src/elementaryFunctions/tanh/ctanhs.c : + Fixed with C99 Complex but Scilab computation. + * src/auxiliaryFunctions/find : + Find not null element in list. + * src/auxiliaryFunctions/find/{sdcz}finda.c : + Implementation : s(float) d(double) + c(floatComplex) z(doubleComplex) + * src/auxiliaryFunctions/find/find.h : + Interface. + * src/auxiliaryFunctions/find/notFound.h : + Constant if all elements are not null. + 2007-02-12 Bruno JOFRET <bruno.jofret@inria.fr> * src/elementaryFunctions/sinh/zsinhs.c @@ -5,11 +5,14 @@ ## Made by Bruno JOFRET <bruno.jofret@inria.fr> ## ## Started on Tue Nov 21 15:22:58 2006 jofret -## Last update Wed Feb 7 10:07:20 2007 jofret +## Last update Tue Feb 13 16:00:07 2007 jofret ## ## Copyright INRIA 2006 ## +RN - Clearly specify what the "find" function may return +BJ Position in array AND/OR Value. + BJ - Bench Cosh Vs . Cosh explicit formula. BJ - Evaluated and drawn - have to be implemented in C : diff --git a/src/auxiliaryFunctions/Makefile b/src/auxiliaryFunctions/Makefile index 4ced8435..c38a45ed 100644 --- a/src/auxiliaryFunctions/Makefile +++ b/src/auxiliaryFunctions/Makefile @@ -5,12 +5,18 @@ ## Made by Bruno JOFRET <bruno.jofret@inria.fr> ## ## Started on Tue Dec 5 09:19:53 2006 jofret -## Last update Thu Feb 8 10:06:18 2007 jofret +## Last update Tue Feb 13 17:17:02 2007 jofret ## ## Copyright INRIA 2006 ## -DIRS = sign +DIRS = sign \ + find #\ + #isempty #\ + #isnan #\ + #rand #\ + #size #\ + #type all: recure diff --git a/src/auxiliaryFunctions/find/Makefile b/src/auxiliaryFunctions/find/Makefile new file mode 100644 index 00000000..88ec08fc --- /dev/null +++ b/src/auxiliaryFunctions/find/Makefile @@ -0,0 +1,43 @@ +## +## -*- makefile -*- +## +## Makefile +## Made by Bruno JOFRET <bruno.jofret@inria.fr> +## +## Started on Thu Nov 30 16:33:40 2006 jofret +## Last update Tue Feb 13 15:54:45 2007 jofret +## +## Copyright INRIA 2006 +## + +NAME = ../../lib/libFind.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 = sfinda.c \ + dfinda.c \ + cfinda.c \ + zfinda.c + +HEAD = find.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/auxiliaryFunctions/find/cfinda.c b/src/auxiliaryFunctions/find/cfinda.c new file mode 100644 index 00000000..aa126296 --- /dev/null +++ b/src/auxiliaryFunctions/find/cfinda.c @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** cfinda.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Tue Feb 13 16:46:42 2007 jofret +** Last update Tue Feb 13 17:15:14 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include "floatComplex.h" +#include "notFound.h" + +int cfinda(floatComplex* z, int size) { + return NOT_FOUND; +} diff --git a/src/auxiliaryFunctions/find/dfinda.c b/src/auxiliaryFunctions/find/dfinda.c new file mode 100644 index 00000000..8241a792 --- /dev/null +++ b/src/auxiliaryFunctions/find/dfinda.c @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** dfinda.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Tue Feb 13 16:52:23 2007 jofret +** Last update Tue Feb 13 17:13:40 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include "notFound.h" + +int dfinda(double* x, int size) { + /* FIXME : Dummy !! */ + return NOT_FOUND; +} diff --git a/src/auxiliaryFunctions/find/find.h b/src/auxiliaryFunctions/find/find.h new file mode 100644 index 00000000..80309109 --- /dev/null +++ b/src/auxiliaryFunctions/find/find.h @@ -0,0 +1,35 @@ +/* +** -*- C -*- +** +** find.h +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Feb 8 10:12:17 2007 jofret +** Last update Tue Feb 13 17:06:30 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#ifndef __FIND_H__ +#define __FIND_H__ + +/* +** \brief Float Find function +*/ +int sfinda(float* x, int size); + +/* +** \brief Double Find function +*/ +int dfinda(double*x, int size); + +/* +** \brief Float Complex Find function +*/ +int cfinda(floatComplex* z, int size); + +/* +** \brief Double Complex Find function +*/ +int zfinda(doubleComplex* z, int size); +#endif /* !__FIND_H__ */ diff --git a/src/auxiliaryFunctions/find/notFound.h b/src/auxiliaryFunctions/find/notFound.h new file mode 100644 index 00000000..59d8c2fe --- /dev/null +++ b/src/auxiliaryFunctions/find/notFound.h @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** notFound.h +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Feb 8 10:12:17 2007 jofret +** Last update Tue Feb 13 17:16:47 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#ifndef __NOT_FOUND_H__ +#define __NOT_FOUND_H__ + +#define NOT_FOUND -1 + +#endif /* !__NOT_FOUND_H__ */ diff --git a/src/auxiliaryFunctions/find/sfinda.c b/src/auxiliaryFunctions/find/sfinda.c new file mode 100644 index 00000000..aab853c6 --- /dev/null +++ b/src/auxiliaryFunctions/find/sfinda.c @@ -0,0 +1,19 @@ +/* +** -*- C -*- +** +** sfinda.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Tue Feb 13 16:53:03 2007 jofret +** Last update Tue Feb 13 17:13:30 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include "notFound.h" + +int sfinda(float* x, int size) { + /* FIXME : Dummy !! */ + return NOT_FOUND; +} + diff --git a/src/auxiliaryFunctions/find/zfinda.c b/src/auxiliaryFunctions/find/zfinda.c new file mode 100644 index 00000000..e43cfa84 --- /dev/null +++ b/src/auxiliaryFunctions/find/zfinda.c @@ -0,0 +1,19 @@ +/* +** -*- C -*- +** +** zfinda.c +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Tue Feb 13 16:51:44 2007 jofret +** Last update Tue Feb 13 17:15:42 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include "doubleComplex.h" +#include "notFound.h" + +int zfinda(doubleComplex* z, int size) { + /* FIXME : Dummy !! */ + return NOT_FOUND; +} diff --git a/src/elementaryFunctions/tan/ctans.c b/src/elementaryFunctions/tan/ctans.c index c6795c7e..20e10b61 100644 --- a/src/elementaryFunctions/tan/ctans.c +++ b/src/elementaryFunctions/tan/ctans.c @@ -5,7 +5,7 @@ ** Made by Bruno JOFRET <bruno.jofret@inria.fr> ** ** Started on Thu Dec 7 12:04:28 2006 jofret -** Last update Wed Jan 31 11:11:43 2007 jofret +** Last update Mon Feb 12 16:57:09 2007 jofret ** ** Copyright INRIA 2006 */ @@ -13,6 +13,6 @@ #include "floatComplex.h" floatComplex ctans(floatComplex z) { - /* FIXME: Dummy... */ + /* FIXME: Dummy... */ return z; } 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)); } |