Message78133
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:12 | loewis | set | recipients:
+ loewis, rhettinger, mark.dickinson, giampaolo.rodola, jyasskin, dingo |
2008-12-21 00:45:12 | loewis | set | messageid: <1229820312.48.0.436627027854.issue4707@psf.upfronthosting.co.za> |
2008-12-21 00:45:11 | loewis | link | issue4707 messages |
2008-12-21 00:45:11 | loewis | create | |
|