PEP0238 lament

Grant Edwards grante at visi.com
Sun Jul 22 18:31:34 EDT 2001


On Sun, 22 Jul 2001 14:22:21 -0400, Tim Peters <tim.one at home.com> wrote:

>It shouldn't be so hard to understand why.  The current integer division
>loses information silently and without a trace.

No, it doesn't.  Integer division is integer division.  The
correct answer for the value of 3/4 is 0.  If you wanted the
remainder, you should ask for it.  If you want to divide
floating point numbers, you should _use_ floating point numbers.

Perhaps my mind was warped by using nothing but integer
arithmatic in my software for many years because floating point
was simply too slow and too expensive.

-- 
Grant Edwards                   grante             Yow!  Are we THERE yet? My
                                  at               MIND is a SUBMARINE!!
                               visi.com            



More information about the Python-list mailing list