PHP cosh () function
Examples
Returns the number of different hyperbolic cosine:
<?php
echo(cosh(3) . "<br>");
echo(cosh(-3) . "<br>");
echo(cosh(0) . "<br>");
echo(cosh(M_PI) . "<br>");
echo(cosh(2*M_PI));
?>
echo(cosh(3) . "<br>");
echo(cosh(-3) . "<br>");
echo(cosh(0) . "<br>");
echo(cosh(M_PI) . "<br>");
echo(cosh(2*M_PI));
?>
Running instance »
Definition and Usage
cosh () function returns the hyperbolic cosine of a number, defined as ((exp (number) + exp (-number)) / 2).
grammar
cosh( number );
参数 | 描述 |
---|---|
number | 必需。规定一个数。 |
technical details
return value: | number hyperbolic cosine. |
---|---|
Return type: | Float |
PHP version: | 4.1+ |
PHP Math Reference