Raul Miller <[email protected]> wrote: > But which approximation holds the most error? >
The naive Stern-Brocot traversal will take you only to fractions which minimize certain error properties _relative to the size of the numerator and denominator_. A bigger numerator and denominator will naturally allow for less error, but obviously they have their own expenses. There are also less-naive traversals of the SB-tree; one example is the use of continued fractions. A continued fraction, converted into one of its standard forms, happens to describe a traversal of the Stern-Brocot tree, with each integer representing a number of levels to traverse left or right on the tree. Because one is taking into account repetitions rather than considering each "turn" separately, one can use powers of the SB generating matrix to compute the next value of the accumulator in a single step. -Wm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
