Trait malachite_q::conversion::traits::ContinuedFraction
source · [−]pub trait ContinuedFraction {
type CF: Iterator<Item = Natural>;
fn continued_fraction(self) -> (Integer, Self::CF);
}
Expand description
Returns a number’s continued fraction.
The form of a continued fraction is $[a_0; a_1, a_2, a_3\ldots]$. The first component of the output pair is $a_0$, and the second is an iterator that produces the $a_i$ for $i > 0$.