integer division rounding

Michael Lunnay mlunnay at ihug.com.au
Mon Jul 16 10:22:12 EDT 2001


Why does an integer division resulting in a negative round down ,e.g -0.5
=> -1, while C and  __builtin__.int() rounds up ,e.g -0.5 => 0. Is this a
purposful error(?), or an oversight?

Michael Lunnay





More information about the Python-list mailing list