Closed trahflow closed 1 year ago
Indeed this is a bug that it appears was introduced in #56, where we incorrectly removed this check: https://github.com/JuliaGeometry/Quaternions.jl/blob/2ea186f3806862383175ea87c675221e9fc61432/src/Quaternion.jl#L134-L139
We kept that check in extend_analytic
but use a separate implementation for log
. I'll push a fix.
I think there is a bug in
Base.log(q::Quaternion)
ifq
is a negative real.For example:
note that this is not due to floating point (im-)precision:
Related answer on math.stackexchange: https://math.stackexchange.com/a/3750503
Note in particular:
I think a fix would be to choose the branch of the logarithm that corresponds to the logarithm on complex numbers, again quoting above math.stackexchange answer: