Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/complex/ccoshf.c')
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccoshf.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/complex/ccoshf.c b/winsup/mingw/mingwex/complex/ccoshf.c
new file mode 100755
index 000000000..ce78cd62d
--- /dev/null
+++ b/winsup/mingw/mingwex/complex/ccoshf.c
@@ -0,0 +1,19 @@
+/*
+ ccoshf.c
+ Contributed by Danny Smith
+ 2004-12-24
+*/
+
+#include <math.h>
+#include <complex.h>
+
+/* ccosh (x + I * y) = cosh (x) * cos (y)
+ + I * (sinh (x) * sin (y)) */
+
+float complex ccoshf (float complex Z)
+{
+ float complex Res;
+ __real__ Res = coshf (__real__ Z) * cosf (__imag__ Z);
+ __imag__ Res = sinhf (__real__ Z) * sinf (__imag__ Z);
+ return Res;
+}