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;
}

 

 

相关文章