Skip to content

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
merged 42 commits into from
Jul 12, 2017
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jul 12, 2017

No description provided.

feadoor and others added 30 commits June 28, 2017 14:02
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)
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.
kw217 and others added 12 commits July 11, 2017 09:47
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.
@cuviper
Copy link
Member Author

cuviper commented Jul 12, 2017

bors r+

bors bot added a commit that referenced this pull request Jul 12, 2017
319: Merge branch 'master' into next; update Float signs r=cuviper
@bors
Copy link
Contributor

bors bot commented Jul 12, 2017

Build succeeded

@bors bors bot merged commit 415a9bf into rust-num:next Jul 12, 2017
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants