R/MRatCalcpowered by RiX

RiX walkthrough 15 g

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.

Runnable RiX

Rational values versus written pairs

Ordinary / constructs a reduced Rational before .F() can run. Structural backticks or the two-component constructor preserve the pair.

Runnable RiX

Unreduced arithmetic

Usual arithmetic uses the represented components and does no cancellation.

Runnable RiX

Classroom denominator policies

General + uses cross-products. Two explicit methods model the common classroom steps of retaining like denominators or first finding the LCM.

Runnable RiX

Representation-sensitive mediants

Pair equality and mathematical equivalence answer different questions, and a mediant deliberately uses the represented components.

Runnable RiX

Subdivide a fraction interval

Fraction intervals keep the written endpoint pairs. Their mediants therefore make each classroom subdivision step inspectable.

Runnable RiX

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.

Runnable RiX

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:

Runnable RiX

It also consumes the finite protocol owned by .continuedFraction:

Runnable RiX

The other direction is direct as well:

Runnable RiX

Bound a Farey search

Runnable RiX

The partial result remains usable and its trace records every represented mediant considered before the explicit work limit.