MCPcopy Index your code
hub / github.com/python/cpython / is_subnormal

Method is_subnormal

Lib/_pydecimal.py:4604–4624  ·  view source on GitHub ↗

Return True if the operand is subnormal; otherwise return False. >>> c = ExtendedContext.copy() >>> c.Emin = -999 >>> c.Emax = 999 >>> c.is_subnormal(Decimal('2.50')) False >>> c.is_subnormal(Decimal('0.1E-999')) True >>> c.is_subnorma

(self, a)

Source from the content-addressed store, hash-verified

4602 return a.is_snan()
4603
4604 def is_subnormal(self, a):
4605 """Return True if the operand is subnormal; otherwise return False.
4606
4607 >>> c = ExtendedContext.copy()
4608 >>> c.Emin = -999
4609 >>> c.Emax = 999
4610 >>> c.is_subnormal(Decimal('2.50'))
4611 False
4612 >>> c.is_subnormal(Decimal('0.1E-999'))
4613 True
4614 >>> c.is_subnormal(Decimal('0.00'))
4615 False
4616 >>> c.is_subnormal(Decimal('-Inf'))
4617 False
4618 >>> c.is_subnormal(Decimal('NaN'))
4619 False
4620 >>> c.is_subnormal(1)
4621 False
4622 """
4623 a = _convert_other(a, raiseit=True)
4624 return a.is_subnormal(context=self)
4625
4626 def is_zero(self, a):
4627 """Return True if the operand is a zero; otherwise return False.

Callers 1

test_is_subnormalMethod · 0.95

Calls 2

_convert_otherFunction · 0.85
is_subnormalMethod · 0.45

Tested by 1

test_is_subnormalMethod · 0.76