FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

PHP tanh() Function

PHP Math Reference PHP Math Reference

Example

Return the hyperbolic tangent of different numbers:

<?php
echo(tanh(M_PI_4) . "<br>");
echo(tanh(0.50) . "<br>");
echo(tanh(-0.50) . "<br>");
echo(tanh(5) . "<br>");
echo(tanh(10) . "<br>");
echo(tanh(-5) . "<br>");
echo(tanh(-10));
?>
Run example »

Definition and Usage

The tanh() function returns the hyperbolic tangent of a number, which is equal to sinh(x)/cosh(x).


Syntax

tanh(number);

Parameter Description
number Required. Specifies a number

Technical Details

Return Value: The hyperbolic tangent of number
Return Type: Float
PHP Version: 4.1+

PHP Math Reference PHP Math Reference