This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Cleanup on the new Math APIs#20993
Merged
tannergooding merged 2 commits intodotnet:masterfrom Nov 14, 2018
tannergooding:math
Merged
Cleanup on the new Math APIs#20993tannergooding merged 2 commits intodotnet:masterfrom tannergooding:math
tannergooding merged 2 commits intodotnet:masterfrom
tannergooding:math
Conversation
…LE_ILOGBNAN_EXITCODE to 1
…n ax and ay are equal
Member
Author
|
CC. @eerhardt, @ViktorHofer |
dotnet-maestro-bot
pushed a commit
to dotnet-maestro-bot/corefx
that referenced
this pull request
Nov 14, 2018
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
dotnet-maestro-bot
pushed a commit
to dotnet-maestro-bot/corert
that referenced
this pull request
Nov 14, 2018
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
eerhardt
reviewed
Nov 14, 2018
| } | ||
|
|
||
| return (Abs(x) < Abs(y)) ? y : x; | ||
| return (ax < ay) ? y : x; |
Member
There was a problem hiding this comment.
Looking at the spec in https://github.com/dotnet/corefx/issues/31903
public static double MinMagnitude(double, double); // IEEE `maxNumMag` - Equivalent to `Math.Max(Math.Abs(x), Math.Abs(y))`
Shouldn't this be returning ax or ay?
Member
Author
There was a problem hiding this comment.
Same response as dotnet/corefx#33359 (comment), the speclet is incorrect and doesn't correctly indicate that it returns the original (non absolute) value of x or y.
jkotas
pushed a commit
to dotnet/corert
that referenced
this pull request
Nov 14, 2018
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas
pushed a commit
to dotnet/corefx
that referenced
this pull request
Nov 14, 2018
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jlennox
pushed a commit
to jlennox/corefx
that referenced
this pull request
Dec 16, 2018
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
* Updating the cached HAVE_COMPATIBLE_ILOGB0_EXITCODE and HAVE_COMPATIBLE_ILOGBNAN_EXITCODE to 1 * Fixing MaxMagnitude and MinMagnitude to correctly handle the case when ax and ay are equal Commit migrated from dotnet/coreclr@4d2be96
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new tests, dotnet/corefx#33359, show that ARM is not being handled correctly and that the wrong result is being chosen for MinMag and MaxMag when
Abx(x) == Abs(y).