C++ Math tanh()The function computes the hyperbolic tangent of an angle given in radian. Mathematically,
tanhx = ex -e-x/ ex+e-x
SyntaxSuppose the angle is 'x': Parameterx: The value whose hyperbolic tangent is to be computed. Return valueIt returns the hyperbolic tangent of x. Example 1Let's see the simple example when the value of x is integer type. Output: Value of degree is : 60 tanh(x) : 0.780507 In this example, tanh(x) function computes the hyperbolic tangent of x and returns the value 0.78. Example 2Let's see the simple example when the value of x is float type. Output: Value of degree is : 45.2 tanh(x) : 0.657552 In this example, tanh(x) function computes the hyperbolic tangent of x and returns the value 0.65.
Next TopicC++ Math Functions
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week