Home »
.Net »
C# Programs
C# - Math.Tanh() Method with Example
In this tutorial, we will learn about the C# Math.Tanh() method with its definition, usage, syntax, and example.
By Nidhi Last updated : March 29, 2023
C# Math.Tanh() Method
The Math.Tanh() method is used to return hyperbolic tangent of the specified angle.
Syntax
double Math.Tanh(double angle);
Parameter(s)
- angle : Given angle, for this we got hyperbolic tangent value.
Return Value
It returns hyperbolic tangent value of specified angle.
C# Example of Math.Tanh() Method
The source code to demonstrate the use of Tanh() method of Math class is given below. The given program is compiled and executed successfully.
using System;
class Sample {
//Entry point of Program
static public void Main() {
double HyperTangent = 0.0;
HyperTangent = Math.Tan(0.7);
System.Console.WriteLine("Hyperbolic tangent of 0.7 is : " + HyperTangent);
}
}
Output
Hyperbolic tangent of 0.7 is : 0.842288380463079
Press any key to continue . . .
C# Math Class Programs »