当前位置: C语言 -- 标准库 -- <complex.h> -- cacosh

cacosh函数


概要:
#include <complex.h>
double complex cacosh(double complex z);

描述:

该函数计算参数z的复数反双曲余弦值,沿实轴在值小于1处进行分支切割(branch cut)。


参数:
double complex z

参数为一个double complex类型的复数。


返回值:

函数返回参数z的复数反双曲余弦值,返回值位于虚轴区间cacosh函数返回值的虚轴区间、实轴区间为非负值的范围内。


范例:
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
/*函数cacosh范例*/

#ifdef __STDC_NO_COMPLEX__
#error "Implementation does not support complex types."
#endif

#include <complex.h>
#include <stdio.h>

int main(void)
{
    double complex x = 2.0 + 1.0I;
    double complex y;
    char *ptr = "cacosh(2.0 + 1.0i)";

    y = cacosh(x);
    printf("%s = %.2f%+.2fi\n", ptr, creal(y),cimag(y));

    return 0;
}

输出:

cacosh(2.0 + 1.0i) = 1.47+0.51i


相关内容:
cacoshf float complex类型的复变反双曲余弦函数。
cacoshl long double complex类型的复变反双曲余弦函数。