atanh() returns the inverse hyperbolic tangent. For a finite real result, the input should be greater than -1 and less than 1.
$value = atanh(0.5);
echo $value;
The examples below build from the basic call to practical variations and edge cases.
<?Php
echo atanh(5); // Output NAN
echo "<br>";
echo atanh(1.5); // Output NAN
echo "<br>";
echo atanh(1); // Output INF
echo "<br>";
echo atanh(0.9); // Output 1.4722194895832
echo "<br>";
echo atanh(0); // Output 0
echo "<br>";
echo atanh(-0.5); // Output -0.54930614433405
echo "<br>";
echo atanh(-1); // Output -INF
echo "<br>";
echo atanh(-1.5); // Output NAN
echo "<br>";
echo atanh(-2.4); // Output NAN
?>
atanh(float $num): float;
For a finite real result, the input must be greater than -1 and less than 1. Inputs of ±1 produce infinite values; inputs outside that interval produce NAN.Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.