csinh
计算复数的双曲正弦值。
接口定义
C interface:
float complex csinhf(float complex x);
double complex csinh(double complex x);
参数
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
x |
|
表示输入数据的浮点值。 |
输入 |
返回值
- 返回x的双曲正弦结果y。
- 特殊值说明如下所示。
输入值实部(x.real)
输入值虚部(x.imag)
输出值实部(y.real)
输出值虚部(y.imag)
0.0
0.0
1.0
0.0
0.0
-0.0
1.0
-0.0
0.0
inf
nan
0.0
0.0
-inf
nan
-0.0
0.0
nan
nan
0.0
0.0
-nan
-nan
0.0
-0.0
0.0
1.0
-0.0
-0.0
-0.0
1.0
0.0
-0.0
inf
nan
-0.0
-0.0
-inf
nan
0.0
-0.0
nan
nan
0.0
-0.0
-nan
-nan
0.0
inf
0.0
inf
0.0
inf
-0.0
inf
-0.0
inf
inf
inf
nan
inf
-inf
inf
nan
inf
nan
inf
nan
inf
-nan
inf
-nan
-inf
0.0
inf
-0.0
-inf
-0.0
inf
0.0
-inf
inf
inf
nan
-inf
-inf
inf
nan
-inf
nan
inf
nan
-inf
-nan
inf
-nan
nan
0.0
nan
0.0
nan
-0.0
nan
-0.0
nan
inf
nan
nan
nan
-inf
nan
nan
nan
nan
nan
nan
nan
-nan
nan
-nan
-nan
0.0
-nan
-0.0
-nan
-0.0
-nan
0.0
-nan
inf
-nan
nan
-nan
-inf
-nan
nan
-nan
nan
-nan
nan
-nan
-nan
-nan
-nan
依赖
C: "kc.h"
示例
C interface:
// typical usage double x1 = INFINITY, y1 = INFINITY; double x2 = 2.0, y2 = 3.0; double x3 = -2.5, y3 = -3.4; double x4 = NAN, y4 = NAN; double x5 = 0, y5 = 0; double complex z1 = csinh(__builtin_complex(x1, y1)); double complex z2 = csinh(__builtin_complex(x2, y2)); double complex z3 = csinh(__builtin_complex(x3, y3)); double complex z4 = csinh(__builtin_complex(x4, y4)); double complex z5 = csinh(__builtin_complex(x5, y5)); // print result printf("/*\n"); printf(" * csinh(%.2f + %.2f*I) = %.6f + %.6f*I\n", x1, y1, __real__(z1), __imag__(z1)); printf(" * csinh(%.2f + %.2f*I) = %.6f + %.6f*I\n", x2, y2, __real__(z2), __imag__(z2)); printf(" * csinh(%.2f + %.2f*I) = %.6f + %.6f*I\n", x3, y3, __real__(z3), __imag__(z3)); printf(" * csinh(%.2f + %.2f*I) = %.6f + %.6f*I\n", x4, y4, __real__(z4), __imag__(z4)); printf(" * csinh(%.2f + %.2f*I) = %.6f + %.6f*I\n", x5, y5, __real__(z5), __imag__(z5)); /* * csinh(inf + inf*I) = inf + nan*I * csinh(2.00 + 3.00*I) = -3.590565 + 0.530921*I * csinh(-2.50 + -3.40*I) = 5.849327 + 1.567052*I * csinh(nan + nan*I) = nan + nan*I * csinh(0.00 + 0.00*I) = 0.000000 + 0.000000*I **/
父主题: 复数函数