-
Notifications
You must be signed in to change notification settings - Fork 149
Merge branch 'master' into next; update Float signs #319
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
+1,271
−32
Conversation
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
BigUint and BigInt can now be multiplied by a BigDigit, re-using the same buffer for the output, thereby reducing allocations and copying.
A BigDigit can be added to a BigUint - this is one of several operations being implemented to allow scalar operations on BigInt and BigUint across the board.
A BigDigit can be subtracted from a BigUint - this is one of several operations being implemented to allow scalar operations on BigInt and BigUint across the board.
A BigUint can be divided by a BigDigit - this is one of several operations being implemented to allow scalar operations on BigInt and BigUint across the board.
Allow the addition to occur with either operand order, and with any combination of owned and borrowed arguments.
Allow the multiplication to occur with either operand order and with any combination of owned and borrowed arguments.
Allow the subtraction to occur with either operand order and with any combination of owned and borrowed arguments.
Allow the division to occur with either operand order and with any combination of owned and borrowed arguments.
We can't use a derived `Hash` when we have a manual `Eq`, because we need to uphold the invariant `a == b` → `h(a) == h(b)`. Since `Eq` doesn't require them to be in reduced form, `Hash` also needs to be normalized.
- Don't apply attributes to statements (1.12.0) - Don't use checked_abs (1.13.0)
Enable bors-ng
315: Fix float NaN positive/negative assumptions r=cuviper These are the minimal assumptions to make about `NaN`. Fixes part of rust-num#312 (but not the `next` branch).
311: rational: make sure Hash agrees with Eq r=cuviper We can't use a derived `Hash` when we have a manual `Eq`, because we need to uphold the invariant `a == b` → `h(a) == h(b)`. Since `Eq` doesn't require them to be in reduced form, `Hash` also needs to be normalized. Fixes rust-num#310.
Resolves rust-num#306. Suggestions welcome for better keywords/categories, though there is a limit of 5 of each.
318: Add cargo keywords and categories. r=cuviper Fixes rust-num#306. Suggestions welcome for better keywords/categories, though there is a limit of 5 of each.
314: Derive ToPrimitive for enums r=cuviper I had to double the compile fail tests, as they will bail on the first error. I have some ideas for more complex to/from primitive derives (with inner values that implement to/from primitive), but I'll save those for a future PR.
313: Scalar operations across all integer types r=cuviper With my apologies for opening a new PR, and also for the 8 month delay, this continues the work started in rust-num#237 - the discussion there outlines the goals I was aiming for. I suppose this supersedes that PR and the other one can now be closed. This PR adds support for Add, Sub, Mul, Div and Rem operations involving one BigInt/BigUint and one primitive integer, with operands in either order, and any combination of owned/borrowed arguments.
bors r+ |
Build succeeded |
cuviper
added a commit
to cuviper/num-traits
that referenced
this pull request
Feb 28, 2018
Formerly changed on the next branch, part of rust-num/num#319.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.