

Leaping Years and Drawing Lines  - muriithi
http://research.swtch.com/2008/02/leaping-years-and-drawing-lines.html

======
xirium
I certainly hadn't associated Bresenham's algorithm with leap year algorithms
but it is a good explanation.

------
bayareaguy
For the gcd, I've always liked this version from python's own unit test:

    
    
      def gcd(a, b):
        while a:
            a, b = b%a, a
        return b

