Expand description
Continued fractions: representation, convergents, and visualization.
Structs§
- Continued
Fraction - A continued fraction [a0; a1, a2, …] representing a0 + 1/(a1 + 1/(a2 + …)).
- Convergent
Glyph - Convergent
Visualizer - Render convergents as points on a number line converging to a target value.
Functions§
- sqrt_cf
- Compute the periodic continued fraction for sqrt(n), where n is not a perfect square. Returns a ContinuedFraction where coefficients form the repeating period.