Linux C function() 参考手册:cosh(取双曲线余玄函数值)

 

资料来源:http://people.cs.nctu.edu.tw/~yslin/library/linuxc/main.htm
线上执行:http://www.tutorialspoint.com/compile_c_online.php / http://codepad.org/

code2html:http://tohtml.com/

相关函数
sinh,tanh
表头文件
#include
定义函数
double cosh(double x);
函数说明
cosh()用来计算参数x的双曲线余玄值,然后将结果返回。数学定义式为:(exp(x)+exp(-x))/2。

使用GCC编译时请加入-lm。

范例

#include
#include
int main()
{
    double answer = cosh(0.5);

    printf(“cosh(0.5) = %f\n”,answer);

    return 0;
}

 

 

相关文章