Skip to content

5-arg mul gives wrong result #663

Closed
JuliaLang/julia
#33218
@lkapelevich

Description

@lkapelevich

MWE:

using LinearAlgebra, Random

Random.seed!(1)
n = 100
A = rand(n, n)
B = rand(n, n)
C = zeros(n, n)
mul!(C, B, A, -1, 0)
D = -B * A
@show norm(D - C) # 2534.227986442133

This also happens for sparse arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions