first commit of the new libm!
[musl] / src / complex / catanh.c
diff --git a/src/complex/catanh.c b/src/complex/catanh.c
new file mode 100644 (file)
index 0000000..b162802
--- /dev/null
@@ -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));
+}