[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
New submission from Marcos Thomaz: At divide a negative integer number for a positive integer number, the result is wrong. For example, in operation: a, b, c = -7, 2, 7 d = divmod(a, b) print a//b, a%b, c[0], c // b, c%b The values printed are -4 1 3 1 -- components: Interpreter

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: I'm sorry, but was a typing error. Try this operations: a, b, c = 7, -7, 2 print "1:", a // c, a % c print "2:", b // c, b % c the result is: 1: 3 1 2: -4 1 The division is the same, except by the signal (variable b is negative, but b

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: Try this operations, in interactive environment: >> 7 // 2 3 >> -7 // 2 -4 -- resolution: not a bug -> status: closed -> open versions: +Python 3.3 ___ Python tracker <http://bugs.

[issue29815] Fail at divide a negative integer number for a positive integer number

2017-03-15 Thread Marcos Thomaz
Marcos Thomaz added the comment: Note that mathematic expression is wrong. -7 divided by 2 is -3, not -4 -- resolution: -> rejected type: behavior -> crash ___ Python tracker <http://bugs.python.org/i