Inexact representation cases (Re: Against PEP 240)

Grant Edwards grante at visi.com
Sat Jun 2 17:53:08 CEST 2001


On Sat, 2 Jun 2001 10:28:25 -0500, Clark C . Evans <cce at clarkevans.com> wrote:
>On Thu, May 31, 2001 at 01:17:31AM -0400, Tim Peters wrote:
>| >>> 1.1
>| 1.1000000000000001
>| >>> 7.35
>| 7.3499999999999996
>
>What is the general pattern for these types of inexact
>represenatation?

1/10 (base 10) is not representable in a finite base-2 number,
in the same way that 2/3 is not representable in a finite
base-10 number.

The same goes for 35/100

-- 
Grant Edwards                   grante             Yow!  I will establish
                                  at               the first SHOPPING MALL in
                               visi.com            NUTLEY, New Jersey...



More information about the Python-list mailing list