python/dist/src/Lib decimal.py,1.24,1.25

Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15229 Modified Files: decimal.py Log Message: Use floor division operator. Index: decimal.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/decimal.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- decimal.py 19 Sep 2004 01:54:09 -0000 1.24 +++ decimal.py 27 Sep 2004 14:23:40 -0000 1.25 @@ -1924,7 +1924,7 @@ tmp = Decimal(self) - expadd = tmp._exp / 2 + expadd = tmp._exp // 2 if tmp._exp & 1: tmp._int += (0,) tmp._exp = 0 @@ -1939,12 +1939,12 @@ ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) ) ans = ans.__add__(tmp.__mul__(Decimal((0, (2,5,9), -2)), context=context), context=context) - ans._exp -= 1 + tmp.adjusted()/2 + ans._exp -= 1 + tmp.adjusted() // 2 else: ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) ) ans = ans.__add__(tmp.__mul__(Decimal((0, (8,1,9), -3)), context=context), context=context) - ans._exp -= 1 + tmp.adjusted()/2 + ans._exp -= 1 + tmp.adjusted() // 2 #ans is now a linear approximation.
participants (1)
-
rhettingerīŧ users.sourceforge.net