Issue #7048: logb should round its result when that result doesn't fit
into the available precision. (Tests for this change are included in the most recent set of testcases from the Decimal Specification site; those testcases will be updated shortly.)
This commit is contained in:
parent
590ecf34ff
commit
15ae41c2db
|
@ -3126,7 +3126,8 @@ class Decimal(object):
|
|||
# otherwise, simply return the adjusted exponent of self, as a
|
||||
# Decimal. Note that no attempt is made to fit the result
|
||||
# into the current context.
|
||||
return Decimal(self.adjusted())
|
||||
ans = Decimal(self.adjusted())
|
||||
return ans._fix(context)
|
||||
|
||||
def _islogical(self):
|
||||
"""Return True if self is a logical operand.
|
||||
|
|
Loading…
Reference in New Issue