Getting tangent and hyperbolic tangent in Julia – tan(), tanh() and tand() Methods
Last Updated :
26 Mar, 2020
The tan()
is an inbuilt function in julia which is used to calculate tangent of the specified radian values.
Syntax: tan(x)
Parameters:
- x: Specified radian values.
Returns: It returns the calculated tangent of the specified radian values.
Example:
println(tan( 0 ))
println(tan( 30 ))
println(tan( 90 ))
println(tan( 44 ))
|
Output:
0.0
-6.405331196646276
-1.995200412208242
0.017704699278685777
The tanh()
is an inbuilt function in julia which is used to calculate hyperbolic tangent of the specified values.
Syntax: tanh(x)
Parameters:
Returns: It returns the calculated hyperbolic tangent of the specified values.
Example:
println(tanh( 0 ))
println(tanh( 70 ))
println(tanh( 90 ))
println(tanh( 45 ))
|
Output:
0.0
1.0
1.0
1.0
The tand()
is an inbuilt function in julia which is used to calculate tangent of the specified value in degrees.
Syntax: tand(x)
Parameters:
- x: Specified value in degrees.
Returns: It returns the calculated tangent of the specified value in degrees.
Example:
println(tand( 0 ))
println(tand( 30 ))
println(tand( 90 ))
println(tand( 45 ))
|
Output:
0.0
0.5773502691896258
Inf
1.0
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...