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

Add atol to addmul tests #56210

Merged
merged 3 commits into from
Oct 30, 2024
Merged

Add atol to addmul tests #56210

merged 3 commits into from
Oct 30, 2024

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Oct 17, 2024

This avoids the issues as in JuliaLang/LinearAlgebra.jl#1093 and JuliaLang/LinearAlgebra.jl#1092 where we compare small numbers using a relative tolerance. Also, in this PR, I have added an extra test, so now we compare both A * B * alpha + C * beta and A * B * alpha - C * beta with the corresponding in-place versions. The idea is that if the terms A * B * alpha and C * beta have similar magnitudes, at least one of the two expressions will usually result in a large enough number that may be compared using a relative tolerance.

I am unsure if the atol chosen here is optimal, as I have ballparked it to use the maximum eps by looking at all the eltypes involved.

Fixes JuliaLang/LinearAlgebra.jl#1093
Fixes JuliaLang/LinearAlgebra.jl#1092

@jishnub jishnub added linear algebra Linear algebra ci Continuous integration labels Oct 17, 2024
@jishnub
Copy link
Contributor Author

jishnub commented Oct 17, 2024

The test failures should be fixed by #55984

@jishnub jishnub merged commit db6e95e into master Oct 30, 2024
5 of 7 checks passed
@jishnub jishnub deleted the jishnub/addmul_atol branch October 30, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration linear algebra Linear algebra
Projects
None yet
2 participants