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

Method is_snan

Lib/_pydecimal.py:4588–4602  ·  view source on GitHub ↗

Return True if the operand is a signaling NaN; otherwise return False. >>> ExtendedContext.is_snan(Decimal('2.50')) False >>> ExtendedContext.is_snan(Decimal('NaN')) False >>> ExtendedContext.is_snan(Decimal('sNaN')) True >>> ExtendedC

(self, a)

Source from the content-addressed store, hash-verified

4586 return a.is_signed()
4587
4588 def is_snan(self, a):
4589 """Return True if the operand is a signaling NaN;
4590 otherwise return False.
4591
4592 >>> ExtendedContext.is_snan(Decimal('2.50'))
4593 False
4594 >>> ExtendedContext.is_snan(Decimal('NaN'))
4595 False
4596 >>> ExtendedContext.is_snan(Decimal('sNaN'))
4597 True
4598 >>> ExtendedContext.is_snan(1)
4599 False
4600 """
4601 a = _convert_other(a, raiseit=True)
4602 return a.is_snan()
4603
4604 def is_subnormal(self, a):
4605 """Return True if the operand is subnormal; otherwise return False.

Callers 1

test_is_snanMethod · 0.95

Calls 2

_convert_otherFunction · 0.85
is_snanMethod · 0.45

Tested by 1

test_is_snanMethod · 0.76