Skip to content

Fastmath screws up return types #46

@moble

Description

@moble
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions