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

[pull] master from rust-num:master #8

Open
wants to merge 216 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 7, 2019

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

m-ou-se and others added 4 commits November 26, 2019 16:57
145: Add the full circle constant τ (TAU) r=cuviper a=m-ou-se

Since it is not (yet?) added to the standard library, the value is included in the source here, instead of referring to a constant in `core`.

Co-authored-by: Mara Bos <[email protected]>
cuviper and others added 14 commits January 9, 2020 13:48
148: Update to autocfg 1 r=cuviper a=cuviper



Co-authored-by: Josh Stone <[email protected]>
149: Release 0.2.11 r=cuviper a=cuviper



Co-authored-by: Josh Stone <[email protected]>
Some WrappingNeg tests rely on core::ops::Neg being implemented for
core::num::Wrapping<_>. Since it was only added in Rust 1.10, this
causes the build to fail for version 1.8 (the MSRV).

The problematic tests have been replaced with a TODO. Ideally, if and
when the MSRV reaches 1.10, it will be a simple matter of reverting this
commit to bring back the tests.
154: Removed repeated words r=cuviper a=vallentin



Co-authored-by: vallentin <[email protected]>
158: Fix the parameter name in the FloatCore::max example r=cuviper a=cuviper

bors r+

Co-authored-by: Josh Stone <[email protected]>
153: Add WrappingNeg trait r=cuviper a=ocstl

Closes #10 

A quick search turned up that the [extprim](https://github.com/kennytm/extprim) implements `PrimInt` for its `u128` and `i128`, but, since both have their own `wrapping_neg` method, it's a non-issue.

That being said, I don't know for certain that it is the only project that implements `PrimInt`, so it might be wise to wait for a larger version bump before merging this.

Co-authored-by: Olivier Chassé St-Laurent <[email protected]>
Co-authored-by: Josh Stone <[email protected]>
160: Switch CI to GitHub Actions r=cuviper a=cuviper



Co-authored-by: Josh Stone <[email protected]>
@pull pull bot added the merge-conflict Resolve conflicts manually label Apr 10, 2020
cuviper and others added 9 commits April 17, 2020 17:20
162: Use {float}::to_int_unchecked() in Rust 1.44+ r=cuviper a=cuviper



Co-authored-by: Josh Stone <[email protected]>
These correspond to the `extra_log_consts` added in Rust 1.43.
165: Add saturating_mul() and refactor Saturating into subtraits. Fixes #40. r=cuviper a=trepetti

Hi all,

Taking the suggestion from #40, this pull request breaks out the saturating trait into three separate SaturatingAdd, SaturatingSub and SaturatingMul traits, borrowing the idea from Checked* and Wrapping*. In terms of native ops, SaturatingNeg would be an option on signed types once the saturating_neg() API is stable on signed integer primitives.

I know there is concern about breaking changes, so I was thinking that I could add a wrapping Saturating trait for backwards compatibility that retains the original functionality:

```
pub trait Saturating: SaturatingAdd + SaturatingSub {}
impl<T> Saturating for T where T: SaturatingAdd + SaturatingSub {}
```

This is not included in the current version, but I would be happy to add.

-Tom ([email protected])

171: Add FloatConst::{LOG10_2, LOG2_10} r=cuviper a=cuviper

These correspond to the `extra_log_consts` added in Rust 1.43.

Co-authored-by: Tom Repetti <[email protected]>
Co-authored-by: Josh Stone <[email protected]>
tarcieri and others added 30 commits February 7, 2024 16:22
Add `ConstZero` and `ConstOne` traits
Earlier versions won't see the incompatible updates at all!
Use namespaced-features to safely bump to MSRV 1.60
…t-integer-decoder

Clarify example for trait method `float::Float::integer_decode`
Remove the implication that wrapping is the default behaviour.
- Remove the implication that wrapping is the default behaviour for `CheckedEuclid` methods.
- Replace mentions of 'underflow' with 'overflow'.
Fix checked operations documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.