tanh()
function in R Language is used to calculate the hyperbolic tangent of the numeric value passed to it as argument.
Syntax: tanh(x)
Parameter:
x: Numeric value
Example 1:
x1 < - - 90
x2 < - - 30
tanh(x1)
tanh(x2)
|
Output:
[1] -1
[1] -1
Example 2:
x1 < - pi
x2 < - pi / 3
tanh(x1)
tanh(x2)
|
Output:
[1] 0.9962721
[1] 0.7807144
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!