PHP cosh

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : cosh() function

Description

The cosh() function is used to get the hyperbolic cosine of a number.

Version

(PHP 4 and above)

Syntax

cosh(num)

Parameter

Name

Description

Required /
Optional

Type

num

A number.

Required

Float

Return value

The hyperbolic cosine of num.

Value Type : Float.

Example :

  1. echo(cosh(4) . '
    ');  

  2. echo(cosh(-4) . '
    ');  

  3. echo(cosh(0) . '
    ');  

  4. echo(cosh(M_PI) . "
    ");  

  5. echo(cosh(M_PI_2));  

  6. ?>  

Output :

27.308232836
27.308232836
1
11.5919532755
2.50917847866