C# Math.Asinh() – Examples
In this tutorial, we will learn about the C# Math.Asinh() method, and learn how to use this method to find the angle whose hyperbolic sine is the specified number, with the help of examples.
Asinh(Double)
Math.Asinh(d) returns the angle whose hyperbolic sine is the specified number d
.
Syntax
The syntax of Asinh(d) method is
</>
Copy
Math.Asinh(Double d)
where
Parameter | Description |
---|---|
d | A double value which is the hyperbolic sine of the angle to be found out. |
Return Value
The method returns a Double value.
Example 1 – Asinh(Double)
In this example, we will give different values ranging from Negative Infinity to Positive Infinity to Asinh() method, and find the corresponding angles, in radians.
C# Program
</>
Copy
using System;
class Example {
static void Main(string[] args) {
Double d, result;
d = Double.NegativeInfinity;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = -5;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = -1;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = 0;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = 1;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = 5;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
d = Double.PositiveInfinity;
result = Math.Asinh(d);
Console.WriteLine($"Asinh({d}) = {result} radians.");
}
}
Output
Asinh(-∞) = -∞ radians.
Asinh(-5) = -2.31243834127275 radians.
Asinh(-1) = -0.881373587019543 radians.
Asinh(0) = 0 radians.
Asinh(1) = 0.881373587019543 radians.
Asinh(5) = 2.31243834127275 radians.
Asinh(∞) = ∞ radians.
Conclusion
In this C# Tutorial, we have learnt the syntax of C# Math.Asinh() method, and also learnt how to use this method with the help of C# example programs.