トップページ > キーワード検索 > cosh()
C言語規格
C言語(その他)
プログラム
その他
cosh()
機能 双曲線余弦(ハイパボリックコサイン)を計算することを表す。

引数の絶対値が大きすぎる場合は値域エラー(ERANGE)が発生する。
定義 #include <math.h>

double cosh ( double x );
float cosh ( float x );
long double cosh ( long double x );

※C99規格では以下の定義となる
double cosh ( double x );
float coshf ( float x );
long double coshl ( long double x );
引数
x計算する値
戻り値 計算結果を返す。
実装例
#include <math.h>
#include <stdio.h>

int main(void)
{
    double a = 0.0;
    
    printf("cosh(%f) = %f\n", a, cosh(a) );  /* cosh(0.0) */

    return 0;
}
実行結果
cosh(0.000000) = 1.000000





inserted by FC2 system