Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in === (caused by #43658?) #44712

Closed
KristofferC opened this issue Mar 23, 2022 · 3 comments · Fixed by #44749
Closed

Regression in === (caused by #43658?) #44712

KristofferC opened this issue Mar 23, 2022 · 3 comments · Fixed by #44749
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version
Milestone

Comments

@KristofferC
Copy link
Member

KristofferC commented Mar 23, 2022

Running the following:

using TensorKit, TensorKitManifolds, StableRNGs
V =^4
T = Float64
rng = StableRNG(0)
W, = leftorth(TensorMap((x...)-> randn(rng, x...), T, V*V*V, V*V); alg = Polar())
X = TensorMap((x...)-> randn(rng, x...), T, space(W))
Y = TensorMap((x...)-> randn(rng, x...), T, space(W))
Δ = Unitary.project(X, W)
Θ = Unitary.project(Y, W)

Δ === Θ

we get falseon 1.7, while on 1.8 this returns true

Here is a proof they are not ===:

julia> Θ.A.data |> sum
1.1102230246251565e-15

julia> Δ.A.data |> sum
-4.6074255521944e-15

Reverting #43658 makes it go away so I guess the bug is from there.

cc @NHDaly

@KristofferC KristofferC added the bug Indicates an unexpected problem or unintended behavior label Mar 23, 2022
@KristofferC KristofferC added this to the 1.8 milestone Mar 23, 2022
@KristofferC KristofferC added the regression Regression in behavior compared to a previous version label Mar 23, 2022
@vtjnash
Copy link
Member

vtjnash commented Mar 23, 2022

return 1;

😱

@NHDaly
Copy link
Member

NHDaly commented Mar 25, 2022

return 1;

😱

😮
Interestingly, I didn't change that line in my PR #43658. Was #43658 somehow not the original cause of the bug, then? It maybe just exposed this existing bug more often due to the changed order we check things in?

@Moelf
Copy link
Contributor

Moelf commented Mar 26, 2022

Yeah I think if that happens last it's not a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants