cosh(): Hyperbolic cosine

float cosh(float X);
X is the input value

<?Php
echo cosh(0); // Output is 1
echo "<br>";
echo cosh(1); // Output  1.5430806348152
echo "<br>";
echo cosh(-1); // Output 1.5430806348152
echo "<br>";
echo cosh(4.2); // Output is 33.350663308873
echo "<br>";
echo cosh(2); // Output is 3.7621956910836
echo "<br>";
echo cosh(90); // Output is 6.1020164715892E+38
?>

Example 1: Using cosh() with Small Negative Numbers

<?php
echo cosh(-0.5);  // Output: 1.1276259652064
?>

Example 2: Calculating Hyperbolic Cosine of Large Numbers

<?php
echo cosh(100);  // Output: A very large number: 1.3440585709081E+43
?>

Example 3: Hyperbolic Cosine in a Real-World Scenario

<?php
// Simulating the shape of a hanging cable (catenary)
$distance = 1.5;
echo cosh($distance);  // Output: 2.3524096152432
?>

Math Functions COS() function SIN() function
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer