LinearAlgebra.jl icon indicating copy to clipboard operation
LinearAlgebra.jl copied to clipboard

muladd(matrix, matrix, scalar) gives unexpected result

Open stevengj opened this issue 10 months ago • 3 comments

This seems wrong:

julia> muladd(zeros(2,2), zeros(2,2), 3)
2×2 Matrix{Float64}:
 3.0  3.0
 3.0  3.0

It's not clear that muladd(X, Y, z) should even be defined when z is a scalar, since it is defined as X * Y + z and we stopped doing implicit vector + scalar broadcasting a long time ago.

This was added in https://github.com/JuliaLang/julia/pull/37065 by @mcabbot, but I don't see much discussion of the scalar case in that PR?

stevengj avatar Jan 01 '25 17:01 stevengj