Your task is to write a basic library for interval arithmetic; you may do as many of the SICP exercises as you wish. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

My Python submission is available on codepad.org.
It requires the fractions module (new in Python 2.6), which adds support for rational number arithmetic.
My work is slightly hackish and could use better variable names, but it’ll do for now.

As Chun Kin Lee pointed out on my blog, my original attempt at removing duplication from times and divide doesn’t work on ranges with negative numbers, so you actually have to get the minimum/maximum of the four possible combinations.