Computer >> Computer tutorials >  >> Programming >> PHP

atanh() function in PHP


The atanh() function returns the inverse hyperbolic tangent of the specified number.

Syntax

atanh(num)

Parameters

  •  num − The specified number. Required.

Return

The atanh() function returns a float value, which is the hyperbolic tangent of a number.

Example

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

Output

INF<br>-INF

Example

Let us see another example −

<?php
   echo(atanh(M_PI_4) . "<br>");
   echo(atanh(0.90) . "<br>");
   echo(atanh(-0.90) . "<br>");
?>

Output

1.0593061708232<br>1.4722194895832<br>-1.4722194895832<br>

Example

Let us see another example −

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

Output

0