tanh()
nikolaspoczekaj19 total contributions
Published Jun 21, 2023
Contribute to Docs
The tanh()
function in PHP is a mathematical function that returns the hyperbolic tangent of a number. It calculates the ratio of the hyperbolic sine to the hyperbolic cosine of the input value.
Syntax
$result = tanh($number);
$number
: The input value for which the hyperbolic tangent will be returned.
Example
In the following example the tanh()
function is used to print the tanh of 10
:
<?phpecho(tanh(10));?>
The output will be:
0.99999999587769
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.