PHP asinh() Function

Beginner
5 min read
Updated: Nov 2026
3 examples
Math

Definition

The PHP asinh() function returns the inverse hyperbolic sine of a number.

It is the opposite of sinh(), and unlike many math functions it works for every real number.

Syntax

Call asinh() with the values you need. Start with this line.

PHP
$result = asinh($num);
CallWhat it does
asinh(0)Returns 0 because sinh(0) is 0.
asinh(1)Returns about 0.8814.
asinh(-1)Returns about -0.8814, because asinh() is symmetric around zero.

Unlike asin(), asinh() accepts any number, positive, negative or zero.

Library declarations
PHP
asinh(float $num): float

Parameters

ParameterDescription
numRequired. The value to work on. Any real number is allowed.

Return Value

Return ValueDescription
floatThe inverse hyperbolic sine of $num.

PHP Examples

Example 1 — Basic asinh() usage

This example shows asinh() with zero, a small number and a bigger number.

PHP
<?php
echo asinh(0) . PHP_EOL;
echo round(asinh(1), 4) . PHP_EOL;
echo round(asinh(10), 4) . PHP_EOL;

How It Works

  1. asinh(0) is exactly 0.
  2. asinh(1) is about 0.881373587, and round(..., 4) gives 0.8814.
  3. asinh(10) is about 2.9982, so the result grows slowly.
  4. Each line is separated by PHP_EOL so the output is easy to read.

Example 2 — Negative numbers are fine

asinh() is an odd function, so asinh(-x) is the same as -asinh(x). Negative inputs do not cause NAN.

PHP
<?php
echo round(asinh(-1), 4) . PHP_EOL;
echo round(asinh(-10), 4) . PHP_EOL;

var_dump(asinh(1) === -asinh(-1));

How It Works

  1. asinh(-1) returns -0.8814, the negative of asinh(1).
  2. asinh(-10) returns -2.9982 in the same way.
  3. -asinh(-1) flips the sign back to positive.
  4. The strict comparison is true because both values are exactly the same float.

Example 3 — Round trip with sinh()

asinh() undoes sinh(). Let us prove it by going forward and then back.

PHP
<?php
$x = 2;
$y = sinh($x);
$back = asinh($y);

echo "sinh(2) = " . round($y, 4) . PHP_EOL;
echo "asinh back = " . round($back, 4) . PHP_EOL;

How It Works

  1. We start with $x = 2.
  2. sinh($x) gives about 3.6269.
  3. asinh($y) reverses the operation and gets back to 2.
  4. round() removes tiny floating point differences so we see a clean 2.

Frequently Asked Questions

asinh() returns the inverse hyperbolic sine of a number. It finds the value whose sinh() equals your input.
Yes. asinh() accepts any real number, and asinh(-1) returns about -0.8814.
Only if you pass NAN in. For all normal numbers it returns a valid float.
asin() is the inverse of sin() and needs input between -1 and 1. asinh() is the inverse of sinh() and accepts every number.
It is 0, because sinh(0) is 0.

Next: atan()

atan() function returns the arc tangent of a number, which is the angle whose tangent is t.

atan() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful