-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Complex.Sqrt comply with IEEE 754 and use double.Hypot #104262
Conversation
Tagging subscribers to this area: @dotnet/area-system-numerics |
src/libraries/System.Runtime.Numerics/src/System/Numerics/Complex.cs
Outdated
Show resolved
Hide resolved
Looks like there's some test failures caused by using Hypot. In particular
The C language specification (which is typically considered the source of truth for IEEE 754 compliance of
Where There is a similar failure for
And thus this is another case where the new behavior is strictly more correct. There's one other edge here that appears to not be handled correctly as well, but which aren't failing the tests. In particular |
Contributes to #104233