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

casinf函数


概要:
#include <complex.h>
float complex casinf(float complex z);

描述:

该函数计算参数z的复数反正弦值,沿实轴在区间[-1+1]外进行分支切割(branch cut)。


参数:
float complex z

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


返回值:

函数返回参数z的复数反正弦值,返回值位于虚轴无限制、实轴区间casinf函数返回值的实轴区间的范围内。


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

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

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

int main(void)
{
    float complex x = 0.5f + 1.0fI;
    float complex y;
    char *ptr = "casinf(0.5f + 1.0fi)";

    y = casinf(x);
    printf("%s = %.2f + %.2fi\n", ptr, crealf(y),cimagf(y));

    return 0;
}

输出:

casinf(0.5f + 1.0fi) = 0.35 + 0.93i


相关内容:
casin double complex类型的复变反正弦函数。
casinl long double complex类型的复变反正弦函数。