Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interval*floating point falls back to generic algorithm in LinearAlgebra.jl #72

Closed
lucaferranti opened this issue Aug 18, 2021 · 0 comments · Fixed by #83
Closed

interval*floating point falls back to generic algorithm in LinearAlgebra.jl #72

lucaferranti opened this issue Aug 18, 2021 · 0 comments · Fixed by #83
Labels
bug Something isn't working

Comments

@lucaferranti
Copy link
Member

lucaferranti commented Aug 18, 2021

Bug description

Multiplying an interval matrix with a floating point matrix uses the generic method in LinearAlgebra.jl instead of Rump multiplicaton in the package

Minimum (non-)working example

julia> A = [1..2 3..4;5..6 7..8]
2×2 Matrix{Interval{Float64}}:
 [1, 2]  [3, 4]
 [5, 6]  [7, 8]

julia> B = [1 2;3 4]
2×2 Matrix{Int64}:
 1  2
 3  4

julia> @which A*B
*(A::AbstractMatrix{T} where T, B::AbstractMatrix{T} where T) in LinearAlgebra at C:\Users\lucaa\AppData\Local\Programs\Julia-1.6.1\share\julia\stdlib\v1.6\LinearAlgebra\src\matmul.jl:151

Expected behavior

should dispatch to the method in IntervalLinearAlgebra.jl. It should be fixable by just adding

@eval *(A::AbstractMatrix{Interval{T}} where T, B::AbstractMatrix{T} where T) =
        *($type, A, B)

@eval *(A::AbstractMatrix{T} where T, B::AbstractMatrix{Interval{T}} where T) =
        *($type, A, B)

in the definition of set_multiplication_mode

Version info

  • IntervalLinearAlgebra.jl version: main-branch
  • System information:
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code.cmd -g
  JULIA_NUM_THREADS =

Related issues

Additional information

Add any other useful information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant