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

Fix simd_try_normalize mask logic #1462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jmagnuson
Copy link
Contributor

Similar to try_normalize, simd_try_normalize compares the norm n against min_norm. The former properly allows a value if it is greater than the minimum:

nalgebra/src/base/norm.rs

Lines 397 to 401 in a3c2610

if n <= min_norm {
None
} else {
Some(self.unscale(n))
}

The simd version uses this comparison boolean as a lanewise mask, but the logic is currently inverted, such that a valid value greater than min_norm results in a false mask.

@jmagnuson
Copy link
Contributor Author

I'm not sure why linalg::eigen::proptest_tests::f64::symmetric_eigen failed; all tests passed locally using rustc 1.79.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant