For large quotients, integer division (//) doesn't seem to be necessarily equal to the floor of regular division (math.floor(a/b)).
I was referring to the question ""IF" argument evaluation order?" for understanding the evaluation order for "if" statement in c++.
I am working on an assembly language program for a 6502 cpu, and am finding that I need a fast-as-possible divide-by-seven routine, in particular one which could take a 16-bit dividend.
In the languages I have tested, - (x div y ) is not equal to -x div y; I have tested // in Python, / in Ruby, div in Perl 6; C has a similar behavior.
For Example,If I writeAs per operator precedence, -8/-5 would be equivalent to ((-8)/(-5)). But will it be possible for C89 to give two values like for the case of -8/5 it can give -1 or -2. or It will treat it as the division of two positive integers?