CATANH - Linux手册页
时间:2019-08-20 17:59:58 来源:igfitidea点击:
Linux程序员手册 第3部分
更新日期: 2020-06-09
名称
catanh,catanhf,catanhl-双曲正切双曲正切
语法
#包括
双复数catanh(双复数z);
浮点复数catanhf(float complex z);
long double complex catanhl(long double complex z);
与-lm链接。
说明
这些函数计算z的复弧双曲正切值。如果y = catanh(z),则z = ctanh(y)。 y的虚部在区间[-pi / 2,pi / 2]中选择。
一个具有:
catanh(z) = 0.5 * (clog(1 + z) - clog(1 - z))
版本
这些功能首先出现在2.1版的glibc中。
属性
有关本节中使用的术语的说明,请参见attribute(7)。
| Interface | Attribute | Value |
| catanh(),catanhf(),catanhl() | 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 = catanh(z);
printf("catanh() = %6.3f %6.3f*i\n", creal(c), cimag(c));
f = 0.5 * (clog(1 + z) - clog(1 - z));
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/。

