summaryrefslogtreecommitdiff
path: root/src/type/testDoubleComplex.c
blob: 5ca02f98d5545e337f844119f844dd461f138ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
**  -*- C -*-
**
** main.c
** Made by  Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on  Thu Nov 30 16:59:04 2006 jofret
** Last update Fri Feb  2 15:39:31 2007 jofret
**
** Copyright INRIA 2006
*/

#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


int main(int argc, char **argv) {
  /* z = -3 + 25*%i */
  doubleComplex z = DoubleComplex(-3,25);
  printf("Partie reelle = %f\n", creal(z));
  printf("Partie imaginaire = %f\n", cimag(z));
  return 0;
}