summaryrefslogtreecommitdiff
path: root/src/type/doubleComplex.h
diff options
context:
space:
mode:
authorjofret2007-01-31 16:37:34 +0000
committerjofret2007-01-31 16:37:34 +0000
commit1f2b1f49842a9a788303ef48bbc4e39eb4fa058c (patch)
tree330fe1efb8152d784c04ac9c822c690f370dd720 /src/type/doubleComplex.h
parent170334ed9128da4a2f916d88ba52db0988e1d119 (diff)
downloadscilab2c-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/type/doubleComplex.h')
-rw-r--r--src/type/doubleComplex.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/type/doubleComplex.h b/src/type/doubleComplex.h
index 7441da1f..3f73f169 100644
--- a/src/type/doubleComplex.h
+++ b/src/type/doubleComplex.h
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Nov 30 16:50:08 2006 jofret
-** Last update Thu Dec 7 11:44:08 2006 jofret
+** Last update Wed Jan 31 10:14:18 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -13,6 +13,11 @@
#ifndef __DOUBLECOMPLEX_H__
#define __DOUBLECOMPLEX_H__
+#ifndef STDC99
+/*
+** Hand made Double Complex definition
+** {
+*/
#include <stdbool.h>
struct double_complex
@@ -28,5 +33,23 @@ double imag(doubleComplex);
doubleComplex DoubleComplex(double, double);
bool isreal(doubleComplex);
bool isimag(doubleComplex);
+/*
+** }
+*/
+
+#else
+
+/*
+** Use standard C99 Double Complex definition
+** {
+*/
+#include <complex.h>
+
+typedef double complex doubleComplex;
+/*
+** }
+*/
+
+#endif /* !STDC99 */
#endif /* !__DOUBLECOMPLEX_H__ */