diff options
Diffstat (limited to 'lib/libm/ccosh.c')
| -rw-r--r-- | lib/libm/ccosh.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libm/ccosh.c b/lib/libm/ccosh.c new file mode 100644 index 00000000..9cfff54a --- /dev/null +++ b/lib/libm/ccosh.c @@ -0,0 +1,12 @@ +#include <math.h> +#include <complex.h> + +double complex ccosh(double complex z) +{ + double x, y; + + x = creal(z); + y = cimag(z); + + return cosh(x) * cos(y) + (sinh(x) * sin(y)) * I; +} |
