在 Julia 中获取反正切和反双曲正切 - atan()、atanh() 和 atand() 方法
atan()
是 julia 中的内置函数,用于计算指定值的反正切,输出以弧度为单位。
Syntax: atan(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse tangent of the specified value and output is in radians.
例子:
# Julia program to illustrate
# the use of atan() method
# Getting inverse tangent of the specified
# values and output is in radians.
println(atan(0))
println(atan(-0.444))
println(atan(0.7774))
println(atan(1))
输出:
0.0
-0.41785313434757676
0.6608077411382699
0.7853981633974483
atanh()
是 julia 中的内置函数,用于计算指定值的反双曲正切。
Syntax: atanh(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse hyperbolic tangent of the specified value.
例子:
# Julia program to illustrate
# the use of atanh() method
# Getting inverse hyperbolic tangent of the
# specified values.
println(atanh(0))
println(atanh(-0.45))
println(atanh(0.5))
println(atanh(-0.896))
输出:
0.0
-0.48470027859405174
0.5493061443340548
-1.4515553918367974
atand()
是 julia 中的内置函数,用于计算指定值的反正切,输出以度为单位。
Syntax: atand(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse tangent of the specified value and output is in degrees.
例子:
# Julia program to illustrate
# the use of atand() method
# Getting inverse tangent of the specified
# values and output is in degrees.
println(atand(0))
println(atand(-0.444))
println(atand(0.7774))
println(atand(1))
输出:
0.0
-23.941221054429125
37.861494636796294
45.0