summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/complex/casinh.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/complex/casinh.c')
-rw-r--r--libc-top-half/musl/src/complex/casinh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/complex/casinh.c b/libc-top-half/musl/src/complex/casinh.c
new file mode 100644
index 0000000..50bf27c
--- /dev/null
+++ b/libc-top-half/musl/src/complex/casinh.c
@@ -0,0 +1,9 @@
+#include "complex_impl.h"
+
+/* asinh(z) = -i asin(i z) */
+
+double complex casinh(double complex z)
+{
+ z = casin(CMPLX(-cimag(z), creal(z)));
+ return CMPLX(cimag(z), -creal(z));
+}