X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook