diff options
Diffstat (limited to 'src/complex/CMPLX.c')
| -rw-r--r-- | src/complex/CMPLX.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/complex/CMPLX.c b/src/complex/CMPLX.c new file mode 100644 index 00000000..d0ffdedf --- /dev/null +++ b/src/complex/CMPLX.c @@ -0,0 +1,16 @@ +#include <complex.h> + +#ifdef __STDC_IEC_559_COMPLEX__ +#define CMPLX(__x, __y) \ + ((double complex)((double)(__x) + _Imaginary_I * (double)(__y))) +#else +#define CMPLX(__x, __y) \ + (((union { \ + double complex __c; \ + double __d[2]; \ + }){ .__d = { __x, __y } }).__c) +#endif + +/* +STDC(201112) +*/ |
