Explore unreduced fractions
Preserve written numerator-denominator pairs, compare representations, and use classroom and mediant operations.
Load .fraction directly or through .fracfun/.symbolic. Its .frac and .f aliases refer to the same plugin.
Rational values versus written pairs
Ordinary / constructs a reduced Rational before .F() can run. Structural backticks or the two-component constructor preserve the pair.
Unreduced arithmetic
Usual arithmetic uses the represented components and does no cancellation.
Classroom denominator policies
General + uses cross-products. Two explicit methods model the common classroom steps of retaining like denominators or first finding the LCM.
Representation-sensitive mediants
Pair equality and mathematical equivalence answer different questions, and a mediant deliberately uses the represented components.
Subdivide a fraction interval
Fraction intervals keep the written endpoint pairs. Their mediants therefore make each classroom subdivision step inspectable.
The four depth-two intervals retain unreduced mediants such as 4/6 where the represented construction step matters.
Use infinity only as an explicit boundary
The signed Stern–Brocot tree uses -1/0 and 1/0 as boundary markers. They do not silently become ordinary numbers.
Calling whole.RationalInterval() is intentionally an error because core RationalInterval has only finite Rational endpoints. 0/0 is never admitted.
Round-trip through a finite continued fraction
The adapter keeps the original written pair even though continued-fraction coefficients describe its reduced value:
It also consumes the finite protocol owned by .continuedFraction:
The other direction is direct as well:
Bound a Farey search
The partial result remains usable and its trace records every represented mediant considered before the explicit work limit.