You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The System.Numerics.Tensors test suite has a Helpers.IsEqualWithTolerance helper method. This is letting through as equal some values which should not be considered equal, in particular when one of the values is infinity or negative infinity. This is one of the reasons we didn't notice the bug cited by #107838, because a value close to 0 and negative infinity were being considered equal. But when updating that helper to accomodate, other existing tests started failing. It's possible those are false positives, but it's also possible we have further edge case bugs to be fixed. We need to investigate.
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
Thanks, @stephentoub. We should investigate this during the .NET 9 GA milestone and verify correctness of test cases that were slipping through coverage before.
This ensures that values such as inf and nan are checked exactly, while finite values are within an expected variance amount. It does so in a way that minimizes additional error and which can account for per input result differences.
@tannergooding -- I'm punting this to 10.0.0. When we address it, if we find there were lurking correctness bugs, we can consider backporting the fixes to .NET 9 in servicing.
Activity
stephentoub commentedon Sep 17, 2024
@jeffhandley, this is what I was referring to earlier today offline.
dotnet-policy-service commentedon Sep 17, 2024
Tagging subscribers to this area: @dotnet/area-system-numerics-tensors
See info in area-owners.md if you want to be subscribed.
jeffhandley commentedon Sep 17, 2024
Thanks, @stephentoub. We should investigate this during the .NET 9 GA milestone and verify correctness of test cases that were slipping through coverage before.
tannergooding commentedon Sep 23, 2024
A valid implementation would be https://github.com/dotnet/runtime/blob/main/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs#L818-L1037
This ensures that values such as
infandnanare checked exactly, while finite values are within an expected variance amount. It does so in a way that minimizes additional error and which can account for per input result differences.jeffhandley commentedon Oct 8, 2024
@tannergooding -- I'm punting this to 10.0.0. When we address it, if we find there were lurking correctness bugs, we can consider backporting the fixes to .NET 9 in servicing.
jeffhandley commentedon Jul 20, 2025
@tannergooding I'm moving this out to 11.0.0 since it hasn't been blocking. Please pull back into 10.0.0 if it gets addressed before GA.
Fix tensor EqualWithTolerance test helper (#127868)
Fix tensor EqualWithTolerance test helper (#127868)
lilinus commentedon Oct 2, 2026
Looks like a case like this was caught in #135056 after fixes to test helper made in #127868. Should this issue be closed?
tannergooding commentedon Oct 2, 2026
Yeah, looks resolved. Closing