C Math tanh() 函数
定义和用法
tanh() 函数返回一个数的双曲正切值。双曲正切等价于 sinh(number) / cosh(number)。
tanh() 函数定义在 <math.h> 头文件中。
实例
返回不同数的双曲正切值:
printf("%f", tanh(3));
printf("%f", tanh(-3));
printf("%f", tanh(0));
printf("%f", tanh(1));
语法
tanh(double number);
参数
| 参数 | 描述 |
|---|---|
| number | 必需。指定一个数。 |
技术细节
| 返回: | 返回 double 类型的值,表示数的双曲正切值。 |
|---|
相关页面
教程:C 函数
教程:C 数学函数