C# Math Tanh
Description
Math Tanh
returns the hyperbolic tangent of the specified
angle.
Syntax
Math.Tanh
has the following syntax.
public static double Tanh(
double value
)
Parameters
Math.Tanh
has the following parameters.
value
- An angle, measured in radians.
Returns
Math.Tanh
method returns The hyperbolic tangent of value. If value is equal to NegativeInfinity,
this method returns -1. If value is equal to PositiveInfinity, this method
returns 1. If value is equal to NaN, this method returns NaN.
Example
The following code shows how to use Math.Tanh method.
using System;/*from w w w. j a v a 2s .c o m*/
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Math.Tanh(0.5));
}
}
The code above generates the following result.