Skip to content

Multiplication involving transpose of a Matrix{<:SMatrix} #966

Closed
@maltezfaria

Description

@maltezfaria

Hi,

I ran into the following (wrong?) behaviour when trying to multiply the following matrices of SMatrix:

using StaticArrays

A = @SMatrix rand(3, 3)
B = @SMatrix rand(3, 3)

blockA = fill(A, 3, 2)
blockB = fill(B, 3, 2)

val1 = blockA * transpose(blockB)
val2 = blockA * collect(transpose(blockB))

val1  val2 # false, by a lot

On my machine, the difference goes away if either A or B is changed to an MMatrix, which I found a bit puzzling. Here is some info on my version:

Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix-in-baseFix needs some work in Base

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions