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