This is from the decimal benchmarks included in the python source[1], in the recipe given in the decimal documentation[2] the precision is increased for the intermediate steps of the algorithm so it gives the correct end result.
Thank you, out of interest on a appliction I work on every now and then showed a 50% improvement with the code as is, not heavy decimal at all, mostly int's though still a nice speedup.
2. http://docs.python.org/library/decimal.html#recipes