How to Use
Enter fraction or path:
- Path: L/R sequence to fraction
- Locate: Find fraction's path
- Levels: Browse tree layers
The Mediant
Mediant of a/b and c/d = (a+c)/(b+d). Not the average! The mediant always lies between the two fractions. This property ensures the tree is in order (in-order traversal gives all rationals sorted).
Continued Fractions
The path to a/b in the Stern-Brocot tree encodes its continued fraction! L=go left (subtract 1), R=go right (take reciprocal minus 1). The number of consecutive L's and R's gives the CF coefficients.
Step-by-Step Instructions
- 1Enter fraction.
- 2Find path.
- 3Navigate tree.
- 4Explore levels.
- 5Convert to CF.