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

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 26-Dec-2019

67 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements