summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/complex/casinh.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/complex/casinh.c')
-rw-r--r--winsup/mingw/mingwex/complex/casinh.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/complex/casinh.c b/winsup/mingw/mingwex/complex/casinh.c
new file mode 100644
index 000000000..a86c1d625
--- /dev/null
+++ b/winsup/mingw/mingwex/complex/casinh.c
@@ -0,0 +1,23 @@
+/*
+ casinh.c
+ Contributed by Danny Smith
+ 2003-10-20
+*/
+
+#include <math.h>
+#include <complex.h>
+
+/* casinh (z) = -I casin (I * z) */
+
+double complex casinh (double complex Z)
+{
+ double complex Tmp;
+ double complex Res;
+
+ __real__ Tmp = - __imag__ Z;
+ __imag__ Tmp = __real__ Z;
+ Tmp = casin (Tmp);
+ __real__ Res = __imag__ Tmp;
+ __imag__ Res = - __real__ Tmp;
+ return Res;
+}