Return the hyperbolic cosine of different numbers:
<?php
echo(cosh(3) . "<br>");
echo(cosh(-3) . "<br>");
echo(cosh(0) . "<br>");
echo(cosh(M_PI) . "<br>");
echo(cosh(2*M_PI));
?>
Try it Yourself »
The cosh() function returns the hyperbolic cosine of a number (equivalent to (exp(number) + exp(-number)) / 2).
cosh(
number);
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The hyperbolic cosine of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!