julia> 1.0 * imz # This returns a QuatVec, as expected
+ 0.0𝐢 + 0.0𝐣 + 1.0𝐤
julia> @fastmath 1.0 * imz # This returns a Quaternion!
0.0 + 0.0𝐢 + 0.0𝐣 + 1.0𝐤
Under the covers, the second version is calling
Base.FastMath.mul_fast(s::Float64, q::QuatVecF64)
which returns a QuaternionF64. I guess this has to do with the fact that I explicitly delineate the various combinations for Base.:*, but don't do so for mul_fast.
Under the covers, the second version is calling
which returns a
QuaternionF64. I guess this has to do with the fact that I explicitly delineate the various combinations forBase.:*, but don't do so formul_fast.