Skip to content

[4.2] SR-7650: Incorrect result adding and subtracting Decimals #1588

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

Merged
merged 2 commits into from
Jun 12, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jun 8, 2018

  • For integerAddition, propogate the carry if set.

  • For integerSubtraction, compute the borrow and set .underflow
    on error.

  • When initialising a Decimal() from an Int or UInt dont convert via
    a double.

Backport to 4.2 of #1550

spevans added 2 commits June 8, 2018 16:01
- For integerAddition, propogate the carry if set.

- For integerSubtraction, compute the borrow and set .underflow
  on error.

- When initialising a Decimal() from an Int or UInt dont convert via
  a double.
- integerAdd(), integerSubtract(): Use more meaningful variable names.
@spevans
Copy link
Contributor Author

spevans commented Jun 8, 2018

@swift-ci please test

@millenomi
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit 76e3f8f into swiftlang:swift-4.2-branch Jun 12, 2018
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