Skip to content

Commit

Permalink
Revert addition to Helpers.IsEqualWithTolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored and github-actions committed Sep 17, 2024
1 parent c3ccf40 commit fda5bde
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/libraries/System.Numerics.Tensors/tests/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public static bool IsEqualWithTolerance<T>(T expected, T actual, T? tolerance =
return false;
}

if (T.IsNegativeInfinity(expected) != T.IsNegativeInfinity(actual))
{
return false;
}

tolerance = tolerance ?? DefaultTolerance<T>.Value;
T diff = T.Abs(expected - actual);
return !(diff > tolerance && diff > T.Max(T.Abs(expected), T.Abs(actual)) * tolerance);
Expand Down

0 comments on commit fda5bde

Please sign in to comment.