The docs for divmod include the following:

    divmod(a, b)
    ...For floating point numbers the result is (q, a % b), where q
    is usually math.floor(a / b) but may be 1 less than that. ...

I know that floating point math can sometimes produce "unexpected"
results, so the above caveat is not entirely surprising.  Still,
I would find it helpful to see a specific example where
divmod(a, b)[0] is equal to math.floor(a/b)-1.  Does anybody know
one?

Thanks!

kynn 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to