summaryrefslogtreecommitdiff
path: root/lib/libm/cimag.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/cimag.c')
-rw-r--r--lib/libm/cimag.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libm/cimag.c b/lib/libm/cimag.c
new file mode 100644
index 00000000..88b5fd58
--- /dev/null
+++ b/lib/libm/cimag.c
@@ -0,0 +1,8 @@
+#include <complex.h>
+#include "__complex.h"
+
+double cimag(double complex z)
+{
+ double_complex w = { .z = z };
+ return (IMAG_PART(w));
+}