C Math asinh() Function

Beginner
⏱️ 9 min read
📚 Updated: Jul 2026
🎯 5 Examples
<math.h>

What You’ll Learn

The asinh() function computes the inverse hyperbolic sine of a number. If you know a value x and want the hyperbolic angle t such that sinh(t) = x, asinh(x) gives you that answer—and unlike acosh(), it accepts any real number.

01

Inverse sinh

Undo sinh().

02

math.h

Link with -lm.

03

All reals

Any x works.

04

asinh(0)

Returns 0.

05

Odd function

asinh(−x).

06

vs asin

Hyperbolic.

Definition and Usage

Hyperbolic sine is defined as sinh(t) = (et − e−t) / 2. The inverse asinh(x) answers: “What value of t produces this sinh output?”

Mathematically: asinh(x) = ln(x + √(x² + 1)). Because x² + 1 is always positive, asinh is defined for every real x—negative, zero, or positive.

💡
Beginner Tip

asinh() is an odd function: asinh(−x) = −asinh(x). Negative inputs are perfectly valid and return negative results.

📝 Syntax

Standard C declaration:

C
double asinh(double x);

Related variants

C
float asinhf(float x);            /* <math.h> */
long double asinhl(long double x); /* <math.h> */

Parameters

  • x — any real number (no domain restriction).

Return Value

  • Real number t such that sinh(t) = x.
  • asinh(0) returns 0.
  • Result grows slowly for large |x| (approximately ln(2|x|) when |x| is large).

Headers and linking

  • #include <math.h>
  • Compile: gcc asinh.c -std=c11 -o asinh -lm

⚡ Quick Reference

CallMeaningResult (approx.)
asinh(0)sinh(0) = 00
asinh(1)sinh(t) = 10.8814
asinh(2)sinh(t) = 21.4436
asinh(-2)Odd symmetry-1.4436
ln(x + sqrt(x*x+1))FormulaSame as asinh(x)
Inverse
asinh(x)

Angle from sinh

Forward
sinh(t)

Sinh from t

Symmetry
asinh(-x)

= -asinh(x)

Verify
sinh(asinh(x))

= x

Examples Gallery

Compile every example with gcc file.c -std=c11 -o out -lm. Hyperbolic functions accept the full range of real inputs.

📚 Getting Started

Compute inverse hyperbolic sine and print the result.

Example 1 — Basic Inverse Hyperbolic Sine

Find t such that sinh(t) = 2.

C
#include <stdio.h>
#include <math.h>

int main(void) {
    double x = 2.0;
    double result = asinh(x);

    printf("The inverse hyperbolic sine of %.2f is %.6f\n", x, result);

    return 0;
}

How It Works

asinh(2) returns about 1.444 because sinh(1.444) ≈ 2. The reference rounded to 1.44; six decimal places show the precise value.

Example 2 — Zero and Negative Inputs

asinh accepts any real number and is an odd function.

C
#include <stdio.h>
#include <math.h>

int main(void) {
    double x = 1.5;

    printf("asinh(0)   = %.6f\n", asinh(0.0));
    printf("asinh(%.1f) = %.6f\n", x, asinh(x));
    printf("asinh(-%.1f) = %.6f\n", x, asinh(-x));

    return 0;
}

How It Works

Unlike acosh(), there is no minimum input. The old reference incorrectly claimed x ≥ 1 was required—asinh works for all reals, including negatives.

📈 Practical Patterns

Inverse verification, the logarithm formula, and large-input behavior.

Example 3 — Verify asinh() with sinh()

Forward and inverse hyperbolic sine undo each other.

C
#include <stdio.h>
#include <math.h>

int main(void) {
    double values[] = { -3.0, -1.0, 0.0, 1.0, 3.0 };
    size_t i;

    for (i = 0; i < sizeof values / sizeof values[0]; i++) {
        double x = values[i];
        double t = asinh(x);
        double back = sinh(t);

        printf("x=%5.1f  asinh(x)=%.4f  sinh(asinh(x))=%.6f\n",
               x, t, back);
    }

    return 0;
}

How It Works

sinh(asinh(x)) equals x for every real x. This is the best sanity check while learning hyperbolic functions.

Example 4 — Compare with the Logarithm Formula

See how the library result matches ln(x + √(x²+1)).

C
#include <math.h>
#include <stdio.h>

int main(void) {
    double x = 2.0;
    double lib = asinh(x);
    double manual = log(x + sqrt(x * x + 1.0));

    printf("asinh(%.1f)       = %.6f\n", x, lib);
    printf("ln(x+sqrt(x^2+1)) = %.6f\n", manual);

    return 0;
}

How It Works

Note x² + 1 (plus), not x² − 1 as in acosh. That is why asinh has no domain restriction.

Example 5 — Behavior for Large |x|

For large x, asinh(x) grows like ln(2x).

C
#include <math.h>
#include <stdio.h>

int main(void) {
    double x = 1000.0;
    double result = asinh(x);
    double approx = log(2.0 * x);

    printf("asinh(%.0f) = %.4f\n", x, result);
    printf("ln(2*x) approx = %.4f\n", approx);

    return 0;
}

How It Works

For very large |x|, asinh(x) ≈ sign(x) · ln(2|x|). This approximation helps when estimating results without a calculator.

🚀 Common Use Cases

  • Special relativity — rapidity calculations involving hyperbolic functions.
  • Statistics — Fisher’s z-transformation and related formulas.
  • Electrical engineering — transmission-line and filter design equations.
  • Scientific computing — solving equations where sinh(t) appears.
  • Pair with sinh() — recover a hyperbolic angle from a known sinh value.

🧠 How asinh() Works

1

Accept any real x

No domain check needed—all inputs are valid.

Domain
2

Apply inverse formula

Compute ln(x + √(x² + 1)) internally.

Compute
3

Return real t

Hyperbolic angle with sinh(t) = x.

Result
=

Hyperbolic angle

Use with sinh(), cosh(), or physics formulas.

📝 Notes

  • Domain is all real numbers—no minimum or maximum input.
  • asinh(0) = 0; asinh(−x) = −asinh(x) (odd function).
  • Not the same as asin() (circular inverse sine, domain [−1, 1]).
  • Link with -lm when using GCC/Clang on Unix-like systems.
  • Use asinhf or asinhl for float or long double data.

⚡ Optimization

asinh() is implemented in the platform math library and is already optimized. Cache results when the same value is computed repeatedly. For float pipelines, use asinhf() to avoid promotion to double.

Conclusion

asinh() inverts hyperbolic sine for any real input. Include <math.h>, link -lm, and pair it with sinh() when solving hyperbolic equations.

Continue with atan() for inverse circular tangent, or explore sinh() for the forward hyperbolic sine.

💡 Best Practices

✅ Do

  • Include <math.h> and link with -lm
  • Use negative inputs freely—they are valid
  • Verify with sinh(asinh(x)) while learning
  • Use asinhf for single-precision data
  • Distinguish asinh from asin in names

❌ Don’t

  • Confuse asinh with asin or acosh
  • Assume a minimum input of 1 (that is acosh)
  • Forget -lm on Linux builds
  • Hand-code the log formula unless you have a special need
  • Expect complex results—asinh always returns real

Key Takeaways

Knowledge Unlocked

Five things to remember about asinh()

Inverse hyperbolic sine in C, explained simply.

5
Core concepts
🌎 02

All reals

Any x.

Domain
🔢 03

asinh(0) = 0

Identity.

Edge
🔄 04

Odd function

Sign flips.

Symmetry
📈 05

vs asin

Hyperbolic.

Compare

❓ Frequently Asked Questions

asinh() returns the inverse hyperbolic sine of x. If sinh(t) = x, then asinh(x) = t. For example, asinh(2) is about 1.444 because sinh(1.444) ≈ 2.
Include <math.h> and link with -lm on many systems: gcc program.c -o program -lm. The function is declared as double asinh(double x).
Any real number. Unlike acosh(), there is no lower bound—asinh accepts negative values, zero, and positive values. asinh(0) returns 0.
No. asin() is inverse circular sine (domain [-1, 1]). asinh() is inverse hyperbolic sine (domain all reals). They solve different mathematical problems.
They are inverses: sinh(asinh(x)) equals x for every real x, and asinh(sinh(t)) equals t for every real t.
asinh(x) = ln(x + sqrt(x*x + 1)). The C library implements this accurately; you rarely code the formula by hand.
Did you know?

The prefix “arc” in older math texts became “a” in C function names: asin is arc-sine, asinh is arc-hyperbolic-sine. The “h” marks the hyperbolic variant—a naming pattern shared by sinh, cosh, tanh, and their inverses.

Explore C Math Functions

Continue with atan() or browse the full math function reference.

Math Functions Index →

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.

3 people found this page helpful