Skip to content

Commit ac2da65

Browse files
authored
Remove cis/cispi (#76)
* Remove cis * Increment version number * Update README.md
1 parent 1a2d4c2 commit ac2da65

File tree

3 files changed

+2
-41
lines changed

3 files changed

+2
-41
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ Implemented functions are:
3030
log2
3131
log10
3232
log1p
33-
cis
34-
cispi
3533
sin
3634
cos
3735
tan

src/Quaternion.jl

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -153,41 +153,6 @@ end
153153
_isexpfun(::Union{typeof(exp),typeof(exp2),typeof(exp10)}) = true
154154
_isexpfun(::Any) = false
155155

156-
"""
157-
cis(q::Quaternion)
158-
159-
Return ``\\exp(u * q)``, where ``u`` is the normalized imaginary part of `q`.
160-
161-
Let ``q = s + a u``, where ``s`` is the real part, ``u`` is a pure unit quaternion,
162-
and ``a \\ge 0`` is the magnitude of the imaginary part of ``q``.
163-
164-
!!! Note
165-
This is the extension of `cis(z)` for complex `z` to the quaternions and is not
166-
equivalent to `exp(im * q)`. As a result, `cis(Quaternion(z)) ≠ cis(z)` when
167-
`imag(z) < 0`.
168-
"""
169-
cis(q::Quaternion)
170-
171-
if VERSION v"1.6"
172-
"""
173-
cispi(q::Quaternion)
174-
175-
Compute `cis(π * q)` more accurately.
176-
177-
!!! Note
178-
This is not equivalent to `exp(π*im*q)`. See [cis(::Quaternion)](@ref) for details.
179-
"""
180-
function Base.cispi(q::Quaternion)
181-
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)
182-
extend_analytic(cispi, q)
183-
end
184-
end
185-
186-
function Base.cis(q::Quaternion)
187-
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)
188-
extend_analytic(cis, q)
189-
end
190-
191156
for f in (
192157
:sqrt, :exp, :exp2, :exp10, :expm1, :log2, :log10, :log1p,
193158
:sin, :cos, :tan, :asin, :acos, :atan, :sinh, :cosh, :tanh, :asinh, :acosh, :atanh,

test/Quaternion.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b
350350
# all complex analytic functions can be extended to the quaternions
351351
#! format: off
352352
unary_funs = [
353-
sqrt, inv, exp, exp2, exp10, expm1, log, log2, log10, log1p, cis,
353+
sqrt, inv, exp, exp2, exp10, expm1, log, log2, log10, log1p,
354354
sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh,
355355
csc, sec, cot, acsc, asec, acot, csch, sech, coth, acsch, asech, acoth,
356356
sinpi, cospi,
@@ -363,7 +363,7 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b
363363
for _ in 1:100
364364
c = randn(ComplexF64)
365365
q = quat(c)
366-
fun !== cis && @test @inferred(fun(q)) fun(c)
366+
@test @inferred(fun(q)) fun(c)
367367
@test q2 * fun(q) * inv(q2) fun(q2 * q * inv(q2))
368368
end
369369
end
@@ -409,8 +409,6 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b
409409
]
410410
@test f(q) finv(inv(q))
411411
end
412-
@test @test_deprecated(cis(q)) exp(normalize(q - real(q)) * q)
413-
VERSION v"1.6" && @test @test_deprecated(cispi(q)) cis* q)
414412
end
415413
end
416414

0 commit comments

Comments
 (0)