Skip to content

muladd(matrix, matrix, scalar) gives unexpected result #1162

Open
@stevengj

Description

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 JuliaLang/julia#37065 by @mcabbot, but I don't see much discussion of the scalar case in that PR?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codemathsMathematical functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions