.Tanh()
Anonymous contributor
Anonymous contributor
Anonymous contributor
Published Apr 10, 2023
Contribute to Docs
The Math.Tanh()
method returns the hyperbolic tangent of a given angle in radians.
Syntax
Math.Tahn(x);
This method accepts a single parameter,x
, which is the angle in radians. It returns the hyperbolic tangent value of x
.
Example
The example below declares two double values, x
and y
, and then calculates the hyperbolic tangent of x
using the Math.Tanh()
function. The resulting value is stored in y
. Finally, the value of y
is printed to the console.
using System;public class Program{public static void Main(){double x = 2;double y = Math.Tanh(x);Console.WriteLine(y);// Output: 0.9640275800758169}}
All contributors
- Anonymous contributorAnonymous contributor
- Anonymous contributor
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.