acos
acos(x)
Compute the inverse cosine of x
, where the output is in radians
Examples
julia> acos(0.5)
1.0471975511965979
Computes the inverse cosine of 0.5
.
julia> acos(1)
0.0
Computes the inverse cosine of 1
.
julia> acos(-1)
3.141592653589793
Computes the inverse cosine of -1
.
julia> acos(2)
DomainError with acos: input -2.0 is out of the range [-1, 1]
Raises a DomainError
for input 2
since it is out of the valid range [-1, 1]
.
julia> acos("hello")
MethodError: no method matching acos(::String)
Raises a MethodError
since the input is of type String
, and acos
is not defined for strings. Ensure the input is of type Number
when using acos
.
See Also
acos, acosd, acosh, acot, acotd, acoth, acsc, acscd, acsch, asec, asecd, asech, asin, asind, asinh, atan, atan2, atand, atanh, cos, cosc, cosd, cosh, cospi, cot, cotd, coth, csc, cscd, csch, deg2rad, rad2deg, sin, sinc, sind, sinh, sinpi, tan, tand, tanh,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.