<?Php
echo tanh(0); // Output is 0
echo "<br>";
echo tanh(1); // Output 0.76159415595576
echo "<br>";
echo tanh(-1); // Output -0.76159415595576
echo "<br>";
echo tanh(4.2); // Output is 0.99955036645953
echo "<br>";
echo tanh(2); // Output is 0.96402758007582
echo "<br>";
echo tanh(90); // Output is 1
?>
Syntax
float tanh(float $x);
$x is the input value. Plotting of SIN & SIN curves by using PHP GD function with deg2rad()
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.