tanpi

Compute the tangent of π*x, where x expressed in half-revolutions.

Methods

julia> methods(tanpi, (Any,), [Base, Base.Math, Base.MathConstants, Base.MPFR])# 7 methods for generic function "tanpi" from Base.Math:
 [1] tanpi(x::BigFloat)
     @ Base.MPFR mpfr.jl:860
 [2] tanpi(::Missing)
     @ math.jl:1533
 [3] tanpi(_x::T) where T<:Union{Float16, Float32, Float64}
     @ special/trig.jl:892
 [4] tanpi(x::AbstractFloat)
     @ special/trig.jl:930
 [5] tanpi(x::Integer)
     @ special/trig.jl:924
 [6] tanpi(x::Real)
     @ math.jl:1528
 [7] tanpi(x::Complex)
     @ special/trig.jl:931

Examples

Real Numbers

julia> tanpi(0)
0.0

julia> tanpi(-0.0)
-0.0

julia> tanpi(0.5)
Inf

julia> tanpi(1.0)
-0.0

julia> tanpi(2.0)
0.0

Complex

julia> tanpi(0+0im)
0.0 + 0.0im

Tips

See Also

tan

Extended Inputs

Tech Notes

  • tanpi(::Real): by pure julia
  • tanpi(::BigFloat): by MPFR

Version History

Introduced in Julia v1.10 (2023)

  • C23 F.10.1.14