forked from rust-num/num-traits
-
Notifications
You must be signed in to change notification settings - Fork 3
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
pull
wants to merge
216
commits into
mesalock-linux:master
Choose a base branch
from
rust-num:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
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]>
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]>
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]>
Add `ConstZero` and `ConstOne` traits
Release 0.2.18
Earlier versions won't see the incompatible updates at all!
Use namespaced-features to safely bump to MSRV 1.60
Implementing clamp for Float trait
Release 0.2.19
Co-authored-by: Josh Stone <[email protected]>
…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
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.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )