Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP cosh() Function

PHP cosh() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the hyperbolic cosine of different numbers:

"); echo(cosh(-3) . "
"); echo(cosh(0) . "
"); echo(cosh(M_PI) . "
"); echo(cosh(2*M_PI)); ?>

Run Example »


Definition and Usage

The cosh() function returns the hyperbolic cosine of a number, defined as ((exp(number) + exp(-number))/2).


Syntax

cosh(

number

);

Parameters Description
number Required. Specifies a number.

Technical Details

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

PHP Math Reference Manual PHP Math Reference Manual