C语言库函数-tanh()
栏目分类:C语言教程 发布日期:2022-07-30 浏览次数:次
C语言标准库 -
C语言库函数 double tanh(double x) 返回 x 的双曲正切。
声明
下面是 tanh() 函数的声明。
double tanh(double x)
参数
- x -- 浮点值。
返回值
该函数返回 x 的双曲正切。
实例
下面的实例演示了 tanh() 函数的用法。
#include#include int main () { double x, ret; x = 0.5; ret = tanh(x); printf("%lf 的双曲正切是 %lf 度", x, ret); return(0); }
让我们编译并运行上面的程序,这将产生以下结果:
0.500000 的双曲正切是 0.462117 度
本文由IT教学网整理发布,转载请注明出处:http://www.clang.cc//jiaocheng/cyuyan/1299.html
