summaryrefslogtreecommitdiff
path: root/src/complex/CMPLX.h
blob: d0ffdedf1fbb9a326345492156ec6b7a9ff91f22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
*/