This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients dingo, giampaolo.rodola, jyasskin, loewis, mark.dickinson, rhettinger
Date 2008-12-21.00:45:11
SpamBayes Score 0.0193664
Marked as misclassified No
Message-id <>
Correct me if I'm wrong, but I think computing the quotient is not
necessary; the remainder is sufficient:

def round(n, i):
    if i >= 0: return n
    i = 10**(-i)
    r = n%(2*i)
    if r < i:
        return n-r
    return n-r+2*i
Date User Action Args
2008-12-21 00:45:12loewissetrecipients: + loewis, rhettinger, mark.dickinson, giampaolo.rodola, jyasskin, dingo
2008-12-21 00:45:12loewissetmessageid: <>
2008-12-21 00:45:11loewislinkissue4707 messages
2008-12-21 00:45:11loewiscreate