Skip to content

Fastmath screws up return types#46

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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