about summary refs log tree commit diff
path: root/src/complex/catanh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/catanh.c')
-rw-r--r--src/complex/catanh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/complex/catanh.c b/src/complex/catanh.c
new file mode 100644
index 00000000..b1628022
--- /dev/null
+++ b/src/complex/catanh.c
@@ -0,0 +1,9 @@
+#include "libm.h"
+
+/* atanh = -i atan(i z) */
+
+double complex catanh(double complex z)
+{
+	z = catan(cpack(-cimag(z), creal(z)));
+	return cpack(cimag(z), -creal(z));
+}