cosh() function in PHP



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
Updated on: 2019-12-26T10:35:17+05:30

124 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements