[issue19446] Integer division for negative numbers
New submission from Nitin Kumar: Mathematically python is not giving correct output for integer division for negative number, e.g. : -7//2= -3 but python is giving output -4. -- components: IDLE files: Integer_division.py messages: 201715 nosy: Nitin.Kumar priority: normal severity: normal status: open title: Integer division for negative numbers type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file32420/Integer_division.py ___ Python tracker <http://bugs.python.org/issue19446> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19446] Integer division for negative numbers
Changes by Nitin Kumar : Removed file: http://bugs.python.org/file32420/Integer_division.py ___ Python tracker <http://bugs.python.org/issue19446> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19446] Integer division for negative numbers
Changes by Nitin Kumar : Added file: http://bugs.python.org/file32421/Integer_division.py ___ Python tracker <http://bugs.python.org/issue19446> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19446] Integer division for negative numbers
Nitin Kumar added the comment: Hi Georg, Is there any operator for integer division in python? On Wed, Oct 30, 2013 at 1:00 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Hi Nitin, > > "a // b" is defined as the floor division operation, same as what > "math.floor(a / b)" gives: the largest integer <= a / b. > > -7/2 is -3.5, the largest integer <= -3.5 is -4. > > -- > nosy: +georg.brandl > resolution: -> invalid > status: open -> closed > > ___ > Python tracker > <http://bugs.python.org/issue19446> > ___ > -- ___ Python tracker <http://bugs.python.org/issue19446> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com