summaryrefslogtreecommitdiff
path: root/src/type/testDoubleComplex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/type/testDoubleComplex.c')
-rw-r--r--src/type/testDoubleComplex.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/type/testDoubleComplex.c b/src/type/testDoubleComplex.c
index 0372c93a..5ca02f98 100644
--- a/src/type/testDoubleComplex.c
+++ b/src/type/testDoubleComplex.c
@@ -5,19 +5,36 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Nov 30 16:59:04 2006 jofret
-** Last update Thu Nov 30 17:55:50 2006 jofret
+** Last update Fri Feb 2 15:39:31 2007 jofret
**
** Copyright INRIA 2006
*/
-#include <stdio.h>
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+
+#ifndef STDC99
+# include <stdio.h>
+# include "doubleComplex.h"
+#else
+# include <stdio.h>
+# include <complex.h>
+# include "doubleComplexC99.h"
+#endif
-#include "doubleComplex.h"
int main(int argc, char **argv) {
- /* z = 1 + %i */
+ /* z = -3 + 25*%i */
doubleComplex z = DoubleComplex(-3,25);
- printf("Partie reelle = %f\n", real(z));
- printf("Partie imaginaire = %f\n", imag(z));
+ printf("Partie reelle = %f\n", creal(z));
+ printf("Partie imaginaire = %f\n", cimag(z));
return 0;
}