cosh() function in PHP

PHPProgrammingServer Side Programming

The cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.

Syntax

cosh(num)

Parameters

  • num − Specifies a number in radians

Return

The cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.

Example

 Live Demo

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

Output

1.5430806348152<br>1.5430806348152

Example

Let us see another example −

 Live Demo

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

Output

1

Example

 Live Demo

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

Output

11.591953275522<br>267.74676148375
raja
Published on 09-Nov-2018 06:37:27
Advertisements