
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP asinh Function
Definition and Usage
The asinh() function calculates inverse of hyperbolic sine of given parameter. In other words, the return value of asinh() is hyperbolic sine of given parameter. A inverse hyperbolic sine function is defined as
asinh(x) = log(x+sqrt(pow(x,2)+1))
This function returns a float value.
Syntax
asinh( float $arg ) : float
Parameters
Sr.No | Parameter & Description |
---|---|
1 |
arg A floating point value whose inverse hyperbolic sine is to be calculated |
Return Values
PHP asinh() function returns inverse hyperbolic sine ratio of given parameter.
PHP Version
This function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.
Example
Following example calculates asinh(pi/2) which we can verify using the definition −
<?php $arg=M_PI_2; $val=asinh($arg); $ret=log($arg+sqrt(pow($arg,2)+1)); echo "asinh(" . $arg . ") = " . $val . "
"; echo "using formula = " . $ret; ?>
Output
This will produce following result −
asinh(1.5707963267949) = 1.2334031175112 using formula = 1.2334031175112
Example
Following example uses deg2rad() function to convert degrees to radians and then uses asinh(30) −
<?php $arg=deg2rad(30); $val=asinh($arg); echo "asinh(" . $arg . ") = " . $val; ?>
Output
This will produce following result −
asinh(0.5235987755983) = 0.50221898503461
Example
Let's check find out asinh(0). It returns 0 −
<?php $arg=0; $val=asinh($arg); echo "asinh(" . $arg . ") = " . $val; ?>
Output
This will produce following result −
asinh(0) = 0
Example
Following example computes asinh(pi)
<?php $arg=M_PI; // pi $val=asinh($arg); echo "asinh(" . $arg . ") = " . $val; ?>
Output
This will produce following result −
asinh(3.1415926535898) = 1.8622957433108