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