Skip to content
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

[Foundation] Fix two Decimal members with respect to NaN #25698

Merged
merged 4 commits into from
Jun 25, 2019
Merged

[Foundation] Fix two Decimal members with respect to NaN #25698

merged 4 commits into from
Jun 25, 2019

Conversation

xwu
Copy link
Collaborator

@xwu xwu commented Jun 24, 2019

This PR fixes Decimal.magnitude so that Decimal.nan.magnitude is no longer incorrectly 0.

It also incorporates changes from swiftlang/swift-corelibs-foundation#1759, which has the salient effect of correcting an error unique to this overlay where (0 as Decimal).doubleValue returned .nan.

Resolves SR-10938.

xwu added 3 commits June 23, 2019 21:18
Fix `Decimal.magnitude` so that `Decimal.nan.magnitude` is no longer incorrectly `0`.
Port changes from swiftlang/swift-corelibs-foundation#1759, crucially correcting an error where `(0 as Decimal).doubleValue` returned `.nan`.
@xwu
Copy link
Collaborator Author

xwu commented Jun 24, 2019

@swift-ci Please test OS X platform

@xwu xwu requested review from phausler and spevans June 24, 2019 02:36
@xwu

This comment has been minimized.

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

Clean up `doubleValue`
@xwu
Copy link
Collaborator Author

xwu commented Jun 24, 2019

@swift-ci Please test

@xwu
Copy link
Collaborator Author

xwu commented Jun 25, 2019

(Reviewed by @spevans over at swift-corelibs-foundation. Will squash and merge.)

@xwu xwu merged commit b2ce4a2 into swiftlang:master Jun 25, 2019
@xwu xwu deleted the magnitude-of-nan branch June 25, 2019 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants