diff options
Diffstat (limited to 'winsup/mingw/mingwex/complex/ccoshf.c')
-rwxr-xr-x | winsup/mingw/mingwex/complex/ccoshf.c | 19 |
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 0000000..ce78cd6 --- /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; +} |