pub trait Computable<T> {
// Required method
fn approximated(&self, limit: &T) -> Approximation<Ratio<T>>;
}
Expand description
This trait represents a real number that is computable. See Wiki
Required Methods§
Sourcefn approximated(&self, limit: &T) -> Approximation<Ratio<T>>
fn approximated(&self, limit: &T) -> Approximation<Ratio<T>>
Return an approximated rational representation of the number
The limit
argument specify the maximum value of denominator. This will
ensures the error of the approximation is less than 1/limit^2.