PHP sinh() Function
In this chapter you will learn:
- Definition for PHP sinh() Function
- Syntax for PHP sinh() Function
- Parameter for PHP sinh() Function
- Return for PHP sinh() Function
- Example - Return the hyperbolic sine of different numbers
Definition
The sinh() function returns the hyperbolic sine of a number, which is equal to (exp(number) - exp(-number))/2).
Syntax
PHP sinh() Function has the following syntax.
sinh(number);
Parameter
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return
Item | Value |
---|---|
Return Value | The hyperbolic sine of number |
Return Type | Float |
Example
Return the hyperbolic sine of different numbers:
<?php/*jav a2 s. c o m*/
echo(sinh(3) . "\n");
echo(sinh(-3) . "\n");
echo(sinh(0) . "\n");
echo(sinh(M_PI) . "\n");
echo(sinh(M_PI_2));
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP sqrt() Function
- Syntax for PHP sqrt() Function
- Parameter for PHP sqrt() Function
- Return for PHP sqrt() Function
- Example - Return the square root of different numbers
Home » PHP Tutorial » PHP Math Functions