summaryrefslogtreecommitdiff
path: root/src/complex/CMPLXL.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/CMPLXL.c')
-rw-r--r--src/complex/CMPLXL.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/complex/CMPLXL.c b/src/complex/CMPLXL.c
new file mode 100644
index 00000000..8e820512
--- /dev/null
+++ b/src/complex/CMPLXL.c
@@ -0,0 +1,17 @@
+#include <complex.h>
+
+#ifdef __STDC_IEC_559_COMPLEX__
+#define CMPLXL(__x, __y) \
+ ((long double complex)((long double)(__x) + \
+ _Imaginary_I * (long double)(__y)))
+#else
+#define CMPLXL(__x, __y) \
+ (((union { \
+ long double complex __c; \
+ long double __ld[2]; \
+ }){ .__ld = { __x, __y } }).__c)
+#endif
+
+/*
+STDC(201112)
+*/