first commit of the new libm!
[musl] / src / complex / cargl.c
diff --git a/src/complex/cargl.c b/src/complex/cargl.c
new file mode 100644 (file)
index 0000000..e0d5047
--- /dev/null
@@ -0,0 +1,13 @@
+#include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double cargl(long double complex z)
+{
+       return carg(z);
+}
+#else
+long double cargl(long double complex z)
+{
+       return atan2l(cimagl(z), creall(z));
+}
+#endif