English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

cosh() function in PHP

Thiscosh()The function returns the hyperbolic cosine of a number. The return value is a floating-point number.

Syntax

cosh(num)

parameter

  • num-a number specified in radians

returns

Thiscosh()The function returns the hyperbolic cosine of a number. The return value is a floating-point number.

Example

<?php
   echo(cosh(1) . "<br>");
   echo(cosh(-1));
?>

Output Result

1.5430806348152<br>1.5430806348152

Example

Let's look at another example-

<?php
   echo(cosh(0));
?>

Output Result

1

Example

<?php
   echo(cosh(M_PI) . "<br>");
   echo(cosh(2*M_PI));
?>

Output Result

11.591953275522<br>267.74676148375