CACOSH - Linux手册页
时间:2019-08-20 17:59:57 来源:igfitidea点击:
Linux程序员手册 第3部分
更新日期: 2020-06-09
名称
cacosh,cacoshf,cacoshl-复弧双曲余弦
语法
#包括
双重复杂的可可(双重复杂的z);
浮点复杂cacoshf(float complex z);
long double complex cacoshl(long double complex z);
与-lm链接。
说明
这些函数计算z的复弧双曲余弦。如果y = cacosh(z),则z = ccosh(y)。 y的虚部在间隔π-πi中选择。 y的实部选择为非负。
一个具有:
cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z - 1) / 2))
版本
这些功能首先出现在2.1版的glibc中。
属性
有关本节中使用的术语的说明,请参见attribute(7)。
| Interface | Attribute | Value |
| cacosh(),cacoshf(),cacoshl() | Thread safety | MT-Safe |
遵循规范
C99,POSIX.1-2001,POSIX.1-2008。
示例
/* Link with "-lm" */
#include <complex.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
double complex z, c, f;
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\n", argv[0]);
exit(EXIT_FAILURE);
}
z = atof(argv[1]) + atof(argv[2]) * I;
c = cacosh(z);
printf("cacosh() = %6.3f %6.3f*i\n", creal(c), cimag(c));
f = 2 * clog(csqrt((z + 1)/2) + csqrt((z - 1)/2));
printf("formula = %6.3f %6.3f*i\n", creal(f2), cimag(f2));
exit(EXIT_SUCCESS);
}
出版信息
这个页面是Linux手册页项目5.08版的一部分。有关项目的说明、有关报告错误的信息以及此页面的最新版本,请访问https://www.kernel.org/doc/man-pages/。

