Skip to content

Mixed matrix multiplication is broken with new versions of IntervalArithmetic #270

@schillic

Description

@schillic
julia> A = hcat(interval(1, 2))
1×1 Matrix{Interval{Float64}}:
 [1.0, 2.0]_com

julia> B = hcat(1)
1×1 Matrix{Int64}:
 1

julia> A * B
┌ Warning: invalid interval, NaI is returned
└ @ IntervalArithmetic ~/.julia/packages/IntervalArithmetic/GSwKs/src/intervals/construction.jl:462
┌ Warning: interval part of NaI
└ @ IntervalArithmetic ~/.julia/packages/IntervalArithmetic/GSwKs/src/intervals/construction.jl:300
┌ Warning: interval part of NaI
└ @ IntervalArithmetic ~/.julia/packages/IntervalArithmetic/GSwKs/src/intervals/construction.jl:300
1×1 Matrix{Interval{Float64}}:
 ∅_ill_NG

The same happens if A is an IntervalMatrix.
Options:

  • Restrict the IntervalArithmetic version again.
  • Forbid mixing interval matrices with normal matrices.
  • Auto-convert normal matrices to interval matrices before multiplying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions