Skip to content

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

Open
pull[bot] wants to merge 231 commits intomesalock-linux:masterfrom
rust-num:master
Open

[pull] master from rust-num:master#8
pull[bot] wants to merge 231 commits intomesalock-linux:masterfrom
rust-num:master

Conversation

@pull
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 <m-ou.se@m-ou.se>
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 <cuviper@gmail.com>
149: Release 0.2.11 r=cuviper a=cuviper



Co-authored-by: Josh Stone <cuviper@gmail.com>
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 <vallentinsource@gmail.com>
158: Fix the parameter name in the FloatCore::max example r=cuviper a=cuviper

bors r+

Co-authored-by: Josh Stone <cuviper@gmail.com>
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 <oliviercsl@gmail.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
160: Switch CI to GitHub Actions r=cuviper a=cuviper



Co-authored-by: Josh Stone <cuviper@gmail.com>
@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 <cuviper@gmail.com>
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 (trepetti@cs.columbia.edu)

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 <trepetti@cs.columbia.edu>
Co-authored-by: Josh Stone <cuviper@gmail.com>
cuviper and others added 30 commits February 7, 2024 17:03
Use namespaced-features to safely bump to MSRV 1.60
Co-authored-by: Josh Stone <cuviper@gmail.com>
…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.
Implement Bounded, ToPrimitive, NumCast, FromPrimitive for NonZero*
Implement Zero, One, and Num for core::num::Saturating<T>
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.