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
bug in IRootFunctions double.Hypot #75651
Comments
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsDescriptionThe double.Hypot functions return negative results.
Just as a note: I've found that the algorithm used is less precise and slower than the simple calculation. Reproduction Steps x = double.Hypot(1, +1e20); // 1E+20 ok
x = double.Hypot(1, -1e10); // 1E+10 ok
x = double.Hypot(1, -1e20); // -1E+20 wrong Expected behavior x = double.Hypot(1, +1e20); // 1E+20 ok
x = double.Hypot(1, -1e10); // 1E+10 ok
x = double.Hypot(1, -1e20); // 1E+20 Actual behavior x = double.Hypot(1, +1e20); // 1E+20 ok
x = double.Hypot(1, -1e10); // 1E+10 ok
x = double.Hypot(1, -1e20); // -1E+20 wrong Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
This will be considered for backporting to 7.0 since it's a bug in new 7.0 functionality. |
Is it ok if I report the other NET7 numeric bugs I've found as a collection in a case list with no detailed explanation for each case? |
We need reproduction steps for each of the cases that have bugs so that regression tests can be added. Not providing them will cause it to take more time overall to get the fix in and risk the fix not making it into .NET 7 RTM. |
@tannergooding ok, next week. |
Description
The double.Hypot function returns negative results.
public static double Hypot(double x, double y)
It is in the line
result = x + y;
where the abs values should be used.Just as note: I've found that the algorithm used is less precise and slower than a common implementation.
Reproduction Steps
Expected behavior
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: