mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Issue #7099: Decimal.is_normal should return True for all nonzero
finite non-subnormal values, even those with exponent > Emax.
This commit is contained in:
parent
e047d7953f
commit
a7a52ab7ee
3 changed files with 16 additions and 13 deletions
|
@ -2917,7 +2917,7 @@ class Decimal(object):
|
|||
return False
|
||||
if context is None:
|
||||
context = getcontext()
|
||||
return context.Emin <= self.adjusted() <= context.Emax
|
||||
return context.Emin <= self.adjusted()
|
||||
|
||||
def is_qnan(self):
|
||||
"""Return True if self is a quiet NaN; otherwise return False."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue