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