C Math tanh() 函数
示例
返回不同数字的双曲正切值:
printf("%f", tanh(3));
printf("%f", tanh(-3));
printf("%f", tanh(0));
printf("%f", tanh(1));
亲自试一试 »
定义和用法
tanh() 函数返回一个数的双曲正切值。双曲正切值等价于 sinh(number) / cosh(number)。
tanh() 函数定义在 <math.h> 头文件中。
语法
One of the following:
tanh(double number);
参数值
| 参数 | 描述 |
|---|---|
| number | 必需。指定一个数字。 |
技术细节
| 返回值: | 一个 double 值,表示一个数的双曲正切值。 |
|---|

