On Mar 4, 8:46 am, NickC <[EMAIL PROTECTED]> wrote: > The increased number of inaccurate answers with Decimal (31% vs 10%) > is probably due to the fact that it is actually more precise than > float
I suspect it has more to do with the fact that 10 is bigger than 2, though I'm not sure I could precisely articulate the reasons why this matters. (A bigger base means a bigger 'wobble', the wobble being the variation in the relationship between an error of 1ulp and a relative error of base**-precision.) Rerunning your example after a getcontext().prec = 16 (i.e. with precision comparable to that of float) gives >>> check_accuracy(Decimal) 310176 Mark -- http://mail.python.org/mailman/listinfo/python-list