在 Julia 中获取反余弦和反双曲余弦 - acos()、acosh() 和 acosd() 方法
acos()
是 julia 中的内置函数,用于计算指定值的反余弦值,输出以弧度为单位。
Syntax: acos(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse cosine of the specified value and output is in radians.
例子:
# Julia program to illustrate
# the use of acos() method
# Getting inverse cosine of the specified
# values and output is in radians.
println(acos(0))
println(acos(-0.444))
println(acos(0.7774))
println(acos(1))
输出:
1.5707963267948966
2.0308542405657466
0.6802746363624282
0.0
acosh()
是 julia 中的一个内置函数,用于计算指定值的反双曲余弦值。
Syntax: acosh(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse hyperbolic cosine of the specified value.
例子:
# Julia program to illustrate
# the use of acosh() method
# Getting inverse hyperbolic cosine of the
# specified values.
println(acosh(2))
println(acosh(10))
println(acosh(74))
println(acosh(45))
输出:
1.3169578969248166
2.993222846126381
4.997166616875528
4.499686190671499
acosd()
是 julia 中的内置函数,用于计算指定值的反余弦,输出以度为单位。
Syntax: acosd(x)
Parameters:
- x: Specified values.
Returns: It returns the calculated inverse cosine of the specified value and output is in degrees.
例子:
# Julia program to illustrate
# the use of acosd() method
# Getting inverse cosine of the specified
# values and output is in degrees.
println(acosd(0))
println(acosd(-0.444))
println(acosd(0.7774))
println(acosd(1))
输出:
90.0
116.35937679066326
38.976865573363945
0.0