pub fn exhaustive_rational_range_to_infinity(
a: Rational
) -> ExhaustiveRationalRangeToInfinity ⓘ
Expand description
Generates all Rational
s greater than or equal to some Rational
$a$.
The output length is infinite.
§Worst-case complexity per iteration
$T(i) = O(\log i (\log \log i)^2 \log\log\log i)$
$M(i) = O(\log i \log \log i)$
where $T$ is time, $M$ is additional memory, and $i$ is the iteration number.
§Examples
use malachite_base::iterators::prefix_to_string;
use malachite_base::num::conversion::traits::ExactFrom;
use malachite_q::exhaustive::exhaustive_rational_range_to_infinity;
use malachite_q::Rational;
assert_eq!(
prefix_to_string(
exhaustive_rational_range_to_infinity(Rational::exact_from(std::f64::consts::PI)),
20
),
"[4, 7/2, 5, 10/3, 6, 9/2, 7, 13/4, 8, 11/2, 9, 11/3, 10, 13/2, 11, 16/5, 12, 15/2, 13, \
13/3, ...]"
)