C# | Math.Tanh() Method Last Updated : 13 Dec, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Math.Tanh() is the inbuilt Math class method which returns the hyperbolic tan of a given double value argument. The result will be NaN if the given argument is NaN.Syntax: public static double Tanh(double num) Parameter: num: It is the number whose hyperbolic tan is to be returned and type of this parameter is System.Double. Return Value: The method returns the hyperbolic tan of num. of type System.Double. If num is equal to NegativeInfinity, this method returns -1. If num is equal to PositiveInfinity, this method returns 1. If num is equal to NaN, this method returns NaN.Examples : Input : num = 60.0 Output : 1.0 Below programs illustrate the Math.Tanh() method:Program 1: Csharp // C# program to illustrate the // Math.Tanh() using System; class GFG { // Main Method public static void Main(String[] args) { double num1 = 60.0, num2 = 0.0, num3 = 1.0; // It returns the hyperbolic tan of // specified angle in radian double tanhvalue = Math.Tanh(num1); Console.WriteLine("The tanh of num1 = " + tanhvalue); tanhvalue = Math.Tanh(num2); Console.WriteLine("The tanh of num2 = " + tanhvalue); tanhvalue = Math.Tanh(num3); Console.WriteLine("The tanh of num3 = " + tanhvalue); } } Output: The tanh of num1 = 1 The tanh of num2 = 0 The tanh of num3 = 0.761594155955765 Program 2: Csharp // C# program to illustrate the // Math.Tanh() Method using System; class GFG { // Main Method public static void Main(String[] args) { double num1 = (30 * (Math.PI)) / 180, num2 = 11.0, num3 = 45.0; // It returns the hyperbolic tan of // angle in radian double tanhvalue = Math.Tanh(num1); Console.WriteLine("The tanh of num1 = " + tanhvalue); tanhvalue = Math.Tanh(num2); Console.WriteLine("The tanh of num2 = " + tanhvalue); tanhvalue = Math.Tanh(num3); Console.WriteLine("The tanh of num3 = " + tanhvalue); } } Output: The tanh of num1 = 0.480472778156452 The tanh of num2 = 0.999999999442106 The tanh of num3 = 1 Comment More infoAdvertise with us Next Article Java Math tan() Method A Akanksha_Rai Follow Improve Article Tags : Misc C# CSharp-method CSharp-Math Practice Tags : Misc Similar Reads C# | Math.Tan() Method Math.Tan() is an inbuilt Math class method which returns the tangent of a given double value argument(specified angle). Syntax: public static double Tan(double num) Parameter: num: It is the angle(measured in radian) whose tangent is to be returned and the type of this parameter is System.Double. Re 2 min read C# | Math.Sinh() Method Math.Sinh() is the inbuilt Math class method which returns the hyperbolic sine of a given double value argument(specified angle).Syntax: public static double Sinh(double num) Parameters: num: It is the number whose hyperbolic sine is to be returned and type of this parameter is System.Double. Return 2 min read Java Math tan() Method The Math.tan() method of java.lang.Math class calculates the trigonometric tangent of an angle. Suppose there is a right-angled triangle, so tan(angle) is the opposite side divided by the adjacent side. If the argument is NaN or an infinity, then the result returned is NaN.If the argument is zero, t 2 min read Java Math tan() Method The Math.tan() method of java.lang.Math class calculates the trigonometric tangent of an angle. Suppose there is a right-angled triangle, so tan(angle) is the opposite side divided by the adjacent side. If the argument is NaN or an infinity, then the result returned is NaN.If the argument is zero, t 2 min read JavaScript Math tanh() Method Javascript Math.tanh() method is used to calculate the value of the hyperbolic tangent of a number. Syntax:Math.tanh(x)Parameter: This method accepts a single parameter as mentioned above and described below:x: which is a number for which the value of hyperbolic tangent is going to be calculated.Ret 3 min read JavaScript Math tan() Method The Javas Math.tan() method in Javascript is used to return the tangent of a number. The Math. tan() method returns a numeric value that represents the tangent of the angle. The tan() is a static method of Math, therefore, it is always used as Math.tan(), rather than as a method of a Math object cre 2 min read Like