stern_brocot_tree (365B)
1 # Stern-Brocot tree 2 3 https://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree 4 5 Should be seen as having 0/1 to the left and 0/1 to the right: for each node you sum the numerators and the denominators ([mediant]) of the closest left node and right node 6 7 Gives all [irreducible_fractions], in sorted order 8 9 Up: [tree] of [rational_numbers] 10 11 See also: [farey_sequence]