Binary GCD Algorithm - Historical Description

Historical Description

An algorithm for computing the GCD of two numbers was described in the ancient Chinese mathematics book The Nine Chapters on the Mathematical Art. The original algorithm was used to reduce a fraction. The description reads:

"If possible halve it; otherwise, take the denominator and the numerator, subtract the lesser from the greater, and do that alternately to make them the same. Reduce by the same number."

This just looks like a normal Euclidian algorithm, but the ambiguity lies in the phrase "if possible halve it". The traditional interpretation is that this only works when 'both' numbers to begin with are even, under which the algorithm is just a slightly inferior Euclidean algorithm (for using subtraction instead of division). But the phrase may as well mean dividing by 2 should 'either' of the numbers become even, in which case it is the binary GCD algorithm.

Read more about this topic:  Binary GCD Algorithm

Famous quotes containing the words historical and/or description:

    “Among the virtues and vices that make up the British character, we have one vice, at least, that Americans ought to view with sympathy. For they appear to be the only people who share it with us. I mean our worship of the antique. I do not refer to beauty or even historical association. I refer to age, to a quantity of years.”
    —William Golding (b. 1911)

    “God damnit, why must all those journalists be such sticklers for detail? Why, they’d hold you to an accurate description of the first time you ever made love, expecting you to remember the color of the room and the shape of the windows.”
    —Lyndon Baines Johnson (1908–1973)