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

_From @kryptan on July 30, 2015 21:50_ Documentation for `CheckedAdd`, `CheckedDiv`, `CheckedMul`, `CheckedSub` says: Performs operation that returns `None` instead of wrapping around on underflow. "instead of wrapping around on...

help wanted
documentation

`logaddexp(x, y)` computes `(x.exp() + y.exp()).log()` more stably than doing those operations naively, and is particularly useful when doing floating point computations in log-space for better precision / stability. Num-traits...

1) Implemented all FIXMEs: → Trait now contains associated constants rather than non-`const` functions. → `LowerBounded` and `UpperBounded` are now supertraits of `Bounded`, not subtraits. 2) Expanded implementations to also...

breaking change

This is a breaking change, but one in line with how the language has evolved. `{ilog, ilog2, ilog10}` should all be methods in PrimInt. These have been stable for [almost...

I think it would be quite neat to have derive macros for all num-traits and this shouldn't be breaking. Use cases would mostly to write simple wrappers as such to...

Earlier versions won't see the incompatible updates at all!

Implementing `clamp` for Float per this issue: https://github.com/rust-num/num-traits/issues/234

I have need in `overflowing_shl`. Is there a reason, why there is no trait for it? P.S. Well, actually I need something like `saturating_shl`, but since there is no such...

enhancement

all uX and iX types implements [checked_add_signed](https://doc.rust-lang.org/std/primitive.u32.html#method.checked_add_signed) and it would be handy to have a trait as marker for such types: ```rust pub trait CheckedAddSigned where Self: Sized, { type...

enhancement

Due to the `exp` being `usize`, the current implementation has been inconsistent with core implementation of `pow` and `checked_pow` taking `u32` for `exp`. This has also inhibited implementation of some...