summaryrefslogtreecommitdiff
path: root/src/complex/clogl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/clogl.c')
-rw-r--r--src/complex/clogl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/complex/clogl.c b/src/complex/clogl.c
new file mode 100644
index 00000000..5b84ba59
--- /dev/null
+++ b/src/complex/clogl.c
@@ -0,0 +1,18 @@
+#include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double complex clogl(long double complex z)
+{
+ return clog(z);
+}
+#else
+// FIXME
+long double complex clogl(long double complex z)
+{
+ long double r, phi;
+
+ r = cabsl(z);
+ phi = cargl(z);
+ return cpackl(logl(r), phi);
+}
+#endif