[Tutor] value of 'e'

Kent Johnson kent37 at tds.net
Tue Nov 24 13:37:13 CET 2009


On Tue, Nov 24, 2009 at 7:01 AM, Wayne Werner <waynejwerner at gmail.com> wrote:

> Well, upon inspection it seems that "The math module consists mostly of thin
> wrappers around the platform C math library functions" - one would presume
> those are accurate, but I don't know to how many places. You might try
> writing your own factorial function that works with the decimal type and
> compare with the result you get from using the math library.

I don't think there is anything wrong with math.factorial(). The
problem is that he is using floating-point (limited precision)
division.

Kent


More information about the Tutor mailing list