We study general two-body decays of primitive and non-primitive 1/4-BPS dyons
in four-dimensional type IIB string compactifications. We find a ``master
equation'' for marginal stability that generalises the curve found by Sen for
half-BPS decay, and analyse this equation in a variety of cases including
decays to 1/4-BPS products. For half-BPS decays, an interesting and useful
relation is exhibited between walls of marginal stability and the mathematics
of Farey sequences and Ford circles. We exhibit an example in which two curves
of marginal stability intersect in the interior of moduli space.Comment: 24 pages, 1 figure, v2: section on non-primitive dyons slightly
modified and expanded, few other small change