Closed boomshroom closed 3 years ago
That make sense. Let’s remove the Bounded
requirement. And let’s add two new methods to RealField
that would replace that Bounded
requirement:
fn max_value() -> Option<Self>;
fn min_value() -> Option<Self>;
While most types would have minimum and maximum values, arbitrary precision types can be useful to drop into an existing function when they're needed. Obviously, arbitrary precision types lack defined minimum and maximum values preventing them from implementing RealField, and since ComplexField also requires declaring the wrapped RealField, ComplexField isn't implementable either even though it doesn't directly depend on Bounded.
The
rug
crate has had to close multiple issues requesting the implementation ofFloat
fromnum-traits
for exactly this reason.