At 05:37 AM 1/1/2007, Kent Johnson wrote: >Dick Moores wrote: >>bestFracForMinimumError() is only a small part of a program I wrote >>long ago, called frac.py >>(<http://www.rcblue.com/Python/fracForWeb.py>). I'm trying to >>rewrite it so as to get more precision by using the Decimal module, >>but am getting nowhere. Errors all over the place. Can some kind >>and knowledgeable soul show me how? > >I don't see where you are actually using the decimal module here, am >I missing something?
You're missing the explanation that I didn't write. ;-) I pasted what I had before even starting to use Decimal, but left in d(), thinking that my helper could use it.. Dick >It doesn't help that you cal the argument to your function 'decimal'. > >>dec = .345765988765560057657654654 > >Your Python interpreter probably doesn't have enough precision to >represent this number directly. Here is what I get: > >In [1]: dec = .345765988765560057657654654 > >In [2]: dec >Out[2]: 0.34576598876556008 > >Kent > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor