Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
sinh() function in PHP
The sinh() function returns the hyperbolic sine of a number, which is mathematically equivalent to (exp(num) - exp(-num))/2. This function is commonly used in mathematical calculations involving hyperbolic trigonometry.
Syntax
sinh(num)
Parameters
num − The number for which you want to calculate the hyperbolic sine. The value should be in radians.
Return Value
The sinh() function returns a float representing the hyperbolic sine of the given number.
Example 1
Basic usage with simple numeric values ?
<?php
echo sinh(0) . "<br>";
echo sinh(1) . "<br>";
echo sinh(-1);
?>
0 1.1752011936438 -1.1752011936438
Example 2
Using mathematical constants with the sinh() function ?
<?php
echo sinh(M_PI) . "<br>";
echo sinh(M_PI_2) . "<br>";
echo sinh(M_E);
?>
11.548739357258 2.3012989023073 7.5441371028169
Key Points
The
sinh()function accepts both positive and negative numbersFor negative inputs, the result is also negative (odd function property)
The function returns a float value
Input values are treated as radians, not degrees
Conclusion
The sinh() function is essential for hyperbolic trigonometric calculations in PHP. It follows standard mathematical conventions and can handle both positive and negative input values effectively.
