Returns the hyperbolic tangent of the specified double that represents an angle.
[Edit]
Parameters
- value
- A double that represents an angle measured in radians.
[Edit]
Returns
A double containing the value of the hyperbolic tangent of
value. If value is equal to double.NegativeInfinity, returns -1. If value is equal to double.PositiveInfinity,
returns 1. If value is equal to double.NaN, returns double.NaN.
[Edit]
Remarks
Example
The following example demonstrates using the Math.Tanh(double) method.
C# Example |
using System;
public class MathTanhExample
{
public static void Main()
{
Double d1 = Math.Tanh(0);
Double d2 = Math.Tanh(Math.PI);
Console.WriteLine("Math.Tanh(0) returns {0}", d1);
Console.WriteLine("Math.Tanh(Math.PI) returns {0}", d2);
}
}
|
The output is
Math.Tanh(0) returns 0
Math.Tanh(Math.PI) returns 0.99627207622075
Requirements
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0