At 01:17 PM 1/2/2007, Terry Carroll wrote: >On Mon, 1 Jan 2007, Dick Moores wrote: > > > bestFracForMinimumError() is only a small part of a program I wrote > > long ago, called frac.py > >Dick, if your goal is to have a routine to get the fraction with the least >possible error (as opposed to learing how to use Decimal), have a look at >this recipe from the Python Cookbook: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52317
Terry, that is truly ingenious. Is there an explication anywhere of exactly how it works? Dick _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor