diff --git a/README.md b/README.md index 0ec4e747..b631a8b4 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,6 @@ Implemented functions are: log2 log10 log1p - cis - cispi sin cos tan diff --git a/src/Quaternion.jl b/src/Quaternion.jl index 60a23a42..98b0db59 100644 --- a/src/Quaternion.jl +++ b/src/Quaternion.jl @@ -154,41 +154,6 @@ end _isexpfun(::Union{typeof(exp),typeof(exp2),typeof(exp10)}) = true _isexpfun(::Any) = false -""" - cis(q::Quaternion) - -Return ``\\exp(u * q)``, where ``u`` is the normalized imaginary part of `q`. - -Let ``q = s + a u``, where ``s`` is the real part, ``u`` is a pure unit quaternion, -and ``a \\ge 0`` is the magnitude of the imaginary part of ``q``. - -!!! Note - This is the extension of `cis(z)` for complex `z` to the quaternions and is not - equivalent to `exp(im * q)`. As a result, `cis(Quaternion(z)) ≠ cis(z)` when - `imag(z) < 0`. -""" -cis(q::Quaternion) - -if VERSION ≥ v"1.6" - """ - cispi(q::Quaternion) - - Compute `cis(π * q)` more accurately. - - !!! Note - This is not equivalent to `exp(π*im*q)`. See [cis(::Quaternion)](@ref) for details. - """ - function Base.cispi(q::Quaternion) - Base.depwarn("`cispi(::Quaternion)` is deprecated and will be removed in the next breaking release. See https://github.com/JuliaGeometry/Quaternions.jl/pull/76 for more information.", :cispi) - extend_analytic(cispi, q) - end -end - -function Base.cis(q::Quaternion) - Base.depwarn("`cis(::Quaternion)` is deprecated and will be removed in the next breaking release. See https://github.com/JuliaGeometry/Quaternions.jl/pull/76 for more information.", :cis) - extend_analytic(cis, q) -end - for f in ( :sqrt, :exp, :exp2, :exp10, :expm1, :log2, :log10, :log1p, :sin, :cos, :tan, :asin, :acos, :atan, :sinh, :cosh, :tanh, :asinh, :acosh, :atanh, diff --git a/test/Quaternion.jl b/test/Quaternion.jl index 12ba7c96..0d6a7e5d 100644 --- a/test/Quaternion.jl +++ b/test/Quaternion.jl @@ -351,7 +351,7 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b # all complex analytic functions can be extended to the quaternions #! format: off unary_funs = [ - sqrt, inv, exp, exp2, exp10, expm1, log, log2, log10, log1p, cis, + sqrt, inv, exp, exp2, exp10, expm1, log, log2, log10, log1p, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, csc, sec, cot, acsc, asec, acot, csch, sech, coth, acsch, asech, acoth, sinpi, cospi, @@ -364,7 +364,7 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b for _ in 1:100 c = randn(ComplexF64) q = quat(c) - fun !== cis && @test @inferred(fun(q)) ≈ fun(c) + @test @inferred(fun(q)) ≈ fun(c) @test q2 * fun(q) * inv(q2) ≈ fun(q2 * q * inv(q2)) end end @@ -410,8 +410,6 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b ] @test f(q) ≈ finv(inv(q)) end - @test @test_deprecated(cis(q)) ≈ exp(normalize(q - real(q)) * q) - VERSION ≥ v"1.6" && @test @test_deprecated(cispi(q)) ≈ cis(π * q) end end