summaryrefslogtreecommitdiff
path: root/src/complex/ctanl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/ctanl.c')
-rw-r--r--src/complex/ctanl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/complex/ctanl.c b/src/complex/ctanl.c
new file mode 100644
index 00000000..4b4c99b6
--- /dev/null
+++ b/src/complex/ctanl.c
@@ -0,0 +1,14 @@
+#include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double complex ctanl(long double complex z)
+{
+ return ctan(z);
+}
+#else
+long double complex ctanl(long double complex z)
+{
+ z = ctanhl(cpackl(-cimagl(z), creall(z)));
+ return cpackl(cimagl(z), -creall(z));
+}
+#endif