Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

c#
asinh
math
communitycreator

What is Math.Asinh() in C#?

Arslan Bajwa

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

C# has a built-in Math class which provides useful mathematical functions and operations. The class has the Asinh() function, which is used to compute the angle whose hyperbolic sine comes out to be a specified number. It is also known as the inverse hyperbolic sine of a specified number.

Syntax

public static double Asinh (double value);

Parameters

  • value: It is of the Double type and represents the input value for which we have to find Asinh(). Its range must be:

    • -∞ <= value <= ∞

Return value

  • Double: This value returns the angle θ in radians and its type is Double.

    • -∞ < θ ≤ -1 (radians)

      or

    • 1 ≤ θ < ∞ (radians)

    It is true only for the valid range of value.

  • NaN: The function returns this if value = NaN.

Multiply radians by 180/Math.PI to convert radians to degrees.

Example

using System;
class Educative
{
    static void Main()
    {
        Double result = Math.Asinh(5);
        System.Console.WriteLine("Asinh(5) = "+ result + " radians");

        Double result1 = Math.Asinh(0);
        System.Console.WriteLine("Asinh(0) = "+ result1 + " radians");

        Double result2 = Math.Asinh(Double.NaN);
        System.Console.WriteLine("Asinh(NaN) = "+ result2);

    }
}

RELATED TAGS

c#
asinh
math
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring