num-traits icon indicating copy to clipboard operation
num-traits copied to clipboard

Numeric traits for generic mathematics in Rust

Results 114 num-traits issues
Sort by recently updated
recently updated
newest added

This was requested in #245. I just removed the `Copy` bound from the `Real` and replaced with `Clone` in `Float`. This would be a breaking change.

breaking change

...and more generally, checked operation traits should not extend their unchecked counterparts. I'd like to contribute a PR to implement `CheckedAdd` for the `NonZero___` types in [`std::num`](https://doc.rust-lang.org/std/num/index.html), but it is...

breaking change

I have an enum type that wraps various Number like types. I was hoping the return value of Zero::zero would depend on the variant. Because the function does not take...

Adds a trait for getting the `BITS` constants e.g. [`u32::BITS`](https://doc.rust-lang.org/std/primitive.u32.html#associatedconstant.BITS).

- `FromPrimitive` functions now refer to implementor for details. --- See https://github.com/rust-num/num-rational/issues/113.

The thing I find most confusing about num-trait is that there is no definition of the purpose and scope of the trait. The documentation says nothing about how the developers...

Hi! This is only a design question about the current implementation of `checked_pow` as a function. Why is it implemented as a function instead of using a trait method as...

The `Saturating` trait was deprecated here: https://github.com/rust-num/num-traits/commit/86c31265f582d98ca58ff494567f1bbaf6aa4b5b, but not officially (i.e. no `#[deprecated, reason = "..."]` attribute). Is there a reason for this? Would it be possible to do this?

Please either add const to the existing members of the Bounded trait, or make a BoundedConst trait to supply const functions.

enhancement