1001Ferramentas
🌳 Converters

Stern-Brocot Converter (Fraction ↔ L/R Path)

Convert a fraction to the left/right (L/R) path that locates it in the Stern-Brocot tree, and back. The tree generates every positive rational exactly once via the mediant of two neighboring fractions. Useful for continued fractions and rational approximations.

Resultado

Árvore de Stern-Brocot

A árvore de Stern-Brocot enumera todos os racionais positivos exatamente uma vez. Partindo dos limites 0/1 e 1/0, cada nó é a mediante (a+c)/(b+d) de seus vizinhos. Descer à esquerda (L) escolhe frações menores; à direita (R), maiores. O caminho L/R até uma fração é único e está ligado à sua fração contínua. A raiz 1/1 corresponde ao caminho vazio.

Related Tools