[issue10346] strange arithmetic behaviour

2010-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: It's not a bug: you're seeing Python's rules for integer division, which do indeed differ from those of (some) other languages when either the divisor or the dividend is negative. For integers x and y, in Python 2.x, x / y gives the floor of the exact quoti

[issue10346] strange arithmetic behaviour

2010-11-07 Thread Alexey Radkov
New submission from Alexey Radkov : The following excerpt will show the issue: $ python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 8 * 4 / ( 2 - 7 ) * 6 / 3 -14 >>> Wh