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

Method is_qnan

Lib/_pydecimal.py:4553–4566  ·  view source on GitHub ↗

Return True if the operand is a quiet NaN; otherwise return False. >>> ExtendedContext.is_qnan(Decimal('2.50')) False >>> ExtendedContext.is_qnan(Decimal('NaN')) True >>> ExtendedContext.is_qnan(Decimal('sNaN')) False >>> ExtendedContext.is_qn

(self, a)

Source from the content-addressed store, hash-verified

4551 return a.is_normal(context=self)
4552
4553 def is_qnan(self, a):
4554 """Return True if the operand is a quiet NaN; otherwise return False.
4555
4556 >>> ExtendedContext.is_qnan(Decimal('2.50'))
4557 False
4558 >>> ExtendedContext.is_qnan(Decimal('NaN'))
4559 True
4560 >>> ExtendedContext.is_qnan(Decimal('sNaN'))
4561 False
4562 >>> ExtendedContext.is_qnan(1)
4563 False
4564 """
4565 a = _convert_other(a, raiseit=True)
4566 return a.is_qnan()
4567
4568 def is_signed(self, a):
4569 """Return True if the operand is negative; otherwise return False.

Callers 1

test_is_qnanMethod · 0.95

Calls 2

_convert_otherFunction · 0.85
is_qnanMethod · 0.45

Tested by 1

test_is_qnanMethod · 0.76