PHP asinh() Function

The asinh() function calculates the inverse hyperbolic sine of a given number. In mathematical terms, it returns the value whose hyperbolic sine equals the input parameter.

The mathematical formula is:

asinh(x) = log(x + sqrt(x² + 1))

Syntax

asinh(float $arg): float

Parameters

Parameter Description
arg A floating point value whose inverse hyperbolic sine is to be calculated

Return Value

Returns the inverse hyperbolic sine of the argument as a float value.

Examples

Basic Usage

Here's a simple example using the value of ? ?

<?php
$arg = M_PI; // pi value
$result = asinh($arg);
echo "asinh(" . $arg . ") = " . $result;
?>
asinh(3.1415926535898) = 1.8622957433108

Multiple Values

Testing with different numeric values ?

<?php
$values = [0, 1, -1, 2.5, -2.5];

foreach ($values as $val) {
    echo "asinh($val) = " . asinh($val) . "
"; } ?>
asinh(0) = 0
asinh(1) = 0.88137358701954
asinh(-1) = -0.88137358701954
asinh(2.5) = 1.6472311463711
asinh(-2.5) = -1.6472311463711

Key Points

  • The function works with both positive and negative values
  • asinh(0) always returns 0
  • The function is the inverse of the sinh() function
  • Available in PHP 4.x, 5.x, and 7.x versions

Conclusion

The asinh() function is useful for mathematical calculations involving inverse hyperbolic functions. It accepts any real number and returns the corresponding inverse hyperbolic sine value as a float.

Updated on: 2026-03-15T08:55:03+05:30

304 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements