MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_snan

Method is_snan

Lib/_pydecimal.py:4585–4599  ·  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

4583 return a.is_signed()
4584
4585 def is_snan(self, a):
4586 """Return True if the operand is a signaling NaN;
4587 otherwise return False.
4588
4589 >>> ExtendedContext.is_snan(Decimal('2.50'))
4590 False
4591 >>> ExtendedContext.is_snan(Decimal('NaN'))
4592 False
4593 >>> ExtendedContext.is_snan(Decimal('sNaN'))
4594 True
4595 >>> ExtendedContext.is_snan(1)
4596 False
4597 """
4598 a = _convert_other(a, raiseit=True)
4599 return a.is_snan()
4600
4601 def is_subnormal(self, a):
4602 """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