函式名:cosh()
函式說明:cosh() 函式返回一個數的雙曲餘弦。
引數:cosh() 函式只接受一個引數,表示一個數值。
返回值:返回一個數的雙曲餘弦值。
使用版本:需要 PHP 4.1.0 或更高版本。
示例:
$x = 2;
$result = cosh($x);
echo "cosh($x) = $result"; // 輸出 "cosh(2) = 3.7621956910836"
$x = 0;
$result = cosh($x);
echo "cosh($x) = $result"; // 輸出 "cosh(0) = 1"
$x = -3;
$result = cosh($x);
echo "cosh($x) = $result"; // 輸出 "cosh(-3) = 10.067661995777"
注意:雙曲餘弦是一個數學函式,用於計算角度的超越函式。這個函式可用於計算一些物理學和工程學問題中的雙曲線相關數值。