C# Tutorial C# Advanced C# References

C# Math - Asinh() Function



The C# Asinh() function returns inverse hyperbolic sine of a value. The inverse hyperbolic sine of x is defined as:

Asinh

In special cases it returns the following:

  • If the argument is NaN, the method returns NaN.
  • If the argument is positive infinity or negative infinity, the method returns the argument.

Syntax

public static double Asinh (double x);

Parameters

x Specify the value.

Return Value

Returns the inverse hyperbolic sine of a value.

Example:

In the example below, Asinh() function is used to find out the inverse hyperbolic sine of a value.

using System;

class MyProgram {
  static void Main(string[] args) {
    Console.WriteLine("Math.Asinh(-2) = "
                      + Math.Asinh(-2));
    Console.WriteLine("Math.Asinh(-1) = "
                      + Math.Asinh(-1));
    Console.WriteLine("Math.Asinh(0) = "
                      + Math.Asinh(0));
    Console.WriteLine("Math.Asinh(1) = "
                      + Math.Asinh(1));
    Console.WriteLine("Math.Asinh(2) = "
                      + Math.Asinh(2));
    Console.WriteLine("Math.Asinh(Double.NaN) = "
                      + Math.Asinh(Double.NaN));
    Console.WriteLine("Math.Asinh(Double.NegativeInfinity) = "
                      + Math.Asinh(Double.NegativeInfinity));
    Console.WriteLine("Math.Asinh(Double.PositiveInfinity) = "
                      + Math.Asinh(Double.PositiveInfinity));
  }
}

The output of the above code will be:

Math.Asinh(-2) = -1.44363547517881
Math.Asinh(-1) = -0.881373587019543
Math.Asinh(0) = 0
Math.Asinh(1) = 0.881373587019543
Math.Asinh(2) = 1.44363547517881
Math.Asinh(Double.NaN) = NaN
Math.Asinh(Double.NegativeInfinity) = -Infinity
Math.Asinh(Double.PositiveInfinity) = Infinity

❮ C# Math Methods