Brocot

The Tropical Year, Cut in Wheels

A day wheel drives a wheel for the year

Gains 0.707 s a year

A whole day in 122,200 years

Planche I

The Train

One turn of the driver in 16 seconds

Other Trains

The same ratio, cut with other wheels

    Set the Ratio

    Your ratio, and the teeth your workshop cuts

    Turns of the first wheel for one turn of the last: a decimal or a fraction, such as 365.24219 or 191/23.

    Known Ratios
    Pairs

    A pair is one driver meshing one driven wheel.

    Read the Error As

    Time Kept reads the error as a clock would show it over a year of running.

    Planche II

    The Tree

    One tree holds every fraction, in order

    • Cuts with your teeth
    • A prime too large for your wheels
    • Needs more pairs

    Brocot's Table

    The tree's best fractions, with Brocot's error

    Every fraction on the path that is closer than all with smaller denominators
    FractionValueBrocot's ErrorDrift a YearCut

    Closest Trains

    The closest ratios your teeth can cut

    Every train inside your limits, ranked by error
    RatioPairsDrift a YearTrainDraw

    How It Is Cut

    Three steps, each checked against a published table

    Every positive fraction appears exactly once in the Stern–Brocot tree, in order. The tree starts at 1/1, between the bounds 0/1 and 1/0, and each step takes the mediant of the two bounds, the fraction whose numerator is the sum of theirs and whose denominator is the sum of theirs, then moves toward the target. Moritz Stern described the tree in 1858. Achille Brocot, a Paris clockmaker, found it on his own and published it in 1861 as a way to choose gear trains, because the fractions closest to a target, for their size, all lie on the path down to it.

    Brocot kept a column of errors beside the path: for a fraction p/q and a target N/D, A = D·p − N·q. A mediant's error is the sum of its parents', so the column fills by addition, and its sign says which side of the target the fraction falls. Divided by q·N it is the relative error, and over a tropical year of 365.24219 days it is the drift.

    A fraction is only worth having if it factors. A train of three pairs turns its last arbor once for every (product of the driven wheels) ÷ (product of the drivers) turns of the first, so p/q can be cut when some multiple of p and the same multiple of q are each a product of three tooth counts inside the limits. The page lists every product of up to three tooth counts, and for each one tries the products on either side of the target. The closest ratio found that way is the closest any train inside the limits can cut, whether or not it is a node of the path. The path then shows which closer fractions were out of reach, and names the prime that put them there: 1,461/4 is a closer year than 365/1, and 1,461 = 3 × 487.

    mediant of a/b and c/d (a + c) / (b + d)

    Brocot's error A = D·p − N·q

    relative error e = A / (q·N)

    drift a year Δ = T·(1 / (1 + e) − 1), with T = 365.24219 days

    a train of three pairs p / q = (z2·z4·z6) / (z1·z3·z5)

    Receipts: the page's arithmetic beside published worked examples
    CheckPublishedThis PageSource

    The test suite runs the same checks, and two more by brute force: every best approximation the path gives for eight targets against every denominator up to 3,000, and the train search against every train inside small limits, one by one. The worst agreement is the 59-tooth moon disc, a day out in 2 years and 7.7 months against a source that gives 2 years and 7 months.

    What It Does Not Do

    • Ratio only. No tooth form, module, centre distance, strength or friction: a train that is right on paper can still be unbuildable. The drawing uses one module for every wheel so the sizes compare.
    • At most three pairs, and wheels of 4 to 200 teeth. Camus's year was published with four pairs; the page finds a three-pair train instead.
    • The search is exhaustive inside the limits and runs in the page, so wide limits on a slow phone take a second or two. The status line says what it is checking.
    • A decimal is read as the exact fraction it writes: 365.24219 is 36,524,219/100,000. Targets carry at most 15 digits.
    • The drift assumes the first wheel turns at exactly its stated rate. No train keeps better time than the clock that drives it.
    • The 2008 AMS column on Brocot carries a copying slip in its three-pair train for Camus's year (358,688 for 358,668). Recomputed, that train is 4.95 s a year slow, not two millionths of a second. The receipts above print the corrected figure.

    Sources