Python doesn't know how to do math?

Chris Spencer clspence at one.net
Thu Apr 25 19:35:04 EDT 2002


	I want to thank everyone who responded to this.  I read the floating
point tutorial and now understand the issues.  I wasn't really looking for that
much precision anyways (2 decimal places was all I really need).  So now that I
know, I shant ask again.

BTW, this is one thing I love about the Python community.  Ask a stupid question
and you get good and helpful answers.

Chris.

On 25 Apr 2002 18:40:45 -0400, David Bolen <db3l at fitlinxx.com> wrote:

<snip>

>The results you are seeing aren't precisely "wrong" (certainly not in
>terms of binary floating point precision), it's just more detail than
>you probably expect by default.  If you thought that computers using
>binary floating point (the most typical nowadays) in lieu of BCD or
>other decimal based formats could precisely represent base 10 numbers
>the same way you might with pencil and paper, that was an erroneous,
>but forgiveable, assumption :-)

<snip>

>-- David




More information about the Python-list mailing list