cotd
Compute the cotangent of x expressed in degrees.
Base.Math.cotd — Function
cotd(x::T) where {T <: Number} -> float(T)Compute the cotangent of x, where x is in degrees.
Throw a DomainError if isinf(x), return a T(NaN) if isnan(x).
Methods
julia> methods(cotd, (Any,), [Base, Base.Math, Base.MathConstants, Base.MPFR])# 1 method for generic function "cotd" from Base.Math: [1] cotd(z::Number) @ special/trig.jl:1167
Examples
Real Numbers
julia> cotd(0)
Inf
julia> cotd(-0.0)
-Inf
julia> cotd(90)
0.0
julia> cotd(45)
1.0
julia> cotd(90)
0.0
julia> cotd(180)
-InfComplex
julia> cotd(0+0im)
NaN + NaN*imTips
See Also
Extended Inputs
Tech Notes
- Implemented in terms of
tand:cotd(x) = inv(tand(x))
Version History
Introduced in Julia v1.0 (2018)