Adding a positive number and a negative number

Grant Edwards invalid at invalid
Fri Jan 30 09:45:46 EST 2009


On 2009-01-30, MRAB <google at mrabarnett.plus.com> wrote:
> Eric Kang wrote:
>
>> In two's complement representation, can adding one positive
>> and one negative give you overflow?
>>
> No.

AFAIK, in Python adding integers never gives you overlow
regardless of sign.

-- 
Grant Edwards                   grante             Yow! Is it clean in other
                                  at               dimensions?
                               visi.com            



More information about the Python-list mailing list