MathF.Asinh() Method in C# with Examples


The MathF.Asinh() method in C# is used to return the hyperbolic arc-sine of a floating-point value.

Syntax

Following is the syntax −

public static float Asinh (float val);

Example

Let us now see an example to implement the MathF.Asinh() method −

using System;
public class Demo {
   public static void Main(){
      float val1 = 1.2f;
      float val2 = 45.5f;
      Console.WriteLine("Angle (val1) = "+(MathF.Asinh(val1)));
      Console.WriteLine("Angle (val2) = "+(MathF.Asinh(val2)));
   }
}

Output

This will produce the following output −

Angle (val1) = 1.015973
Angle (val2) = 4.51098

Example

Let us now see another example to implement the MathF.Asinh() method −

using System;
public class Demo {
   public static void Main(){
      float val1 = 0.1f;
      float val2 = 11.91f;
      Console.WriteLine("Return Value (val1) = "+(MathF.Asinh(val1)));
      Console.WriteLine("Return Value (val2) = "+(MathF.Asinh(val2)));
   }
}

Output

This will produce the following output

Return Value (val1) = 0.09983408
Return Value (val2) = 3.172283

Updated on: 13-Nov-2019

56 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements