Steven D'Aprano <[EMAIL PROTECTED]> writes: > Unfortunately that doesn't work reliably. > > >>> a, b = 9007199254741000.0, -3.0 > >>> a/b > -3002399751580333.5 > >>> (a+b-1)//b # should be -3002399751580333 > -3002399751580332.0
I should have mentioned (a+b-1)//b expects a and b to be positive integers. -- http://mail.python.org/mailman/listinfo/python-list