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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version