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 <1229820312.48.0.436627027854.issue4707@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2008-12-21 00:45:12loewissetrecipients: + loewis, rhettinger, mark.dickinson, giampaolo.rodola, jyasskin, dingo
2008-12-21 00:45:12loewissetmessageid: <1229820312.48.0.436627027854.issue4707@psf.upfronthosting.co.za>
2008-12-21 00:45:11loewislinkissue4707 messages
2008-12-21 00:45:11loewiscreate