Note that Python 2.4 will include a 'decimal' module that exposes a numerical type far better suited to this sort of calculation that binary floating point.