Fix misplaced exactness check that was causing unnecessary work in Decimal.__pow__.
This commit is contained in:
parent
a123631a5c
commit
e42f1bb354
|
@ -2327,7 +2327,8 @@ class Decimal(object):
|
|||
# try for an exact result with precision +1
|
||||
if ans is None:
|
||||
ans = self._power_exact(other, context.prec + 1)
|
||||
if ans is not None and result_sign == 1:
|
||||
if ans is not None:
|
||||
if result_sign == 1:
|
||||
ans = _dec_from_triple(1, ans._int, ans._exp)
|
||||
exact = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue