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

Method is_nan

Lib/_pydecimal.py:3096–3098  ·  view source on GitHub ↗

Return True if self is a qNaN or sNaN; otherwise return False.

(self)

Source from the content-addressed store, hash-verified

3094 return self._exp == 'F'
3095
3096 def is_nan(self):
3097 """Return True if self is a qNaN or sNaN; otherwise return False."""
3098 return self._exp in ('n', 'N')
3099
3100 def is_normal(self, context=None):
3101 """Return True if self is a normal number; otherwise return False."""

Callers 15

__hash__Method · 0.95
as_integer_ratioMethod · 0.95
__round__Method · 0.95
__floor__Method · 0.95
__ceil__Method · 0.95
same_quantumMethod · 0.95
is_nanMethod · 0.45
test_implicit_contextMethod · 0.45
test_divmodMethod · 0.45
test_quantizeMethod · 0.45
test_py_rescaleMethod · 0.45
test_parse_floatMethod · 0.45

Calls

no outgoing calls

Tested by 5

test_implicit_contextMethod · 0.36
test_divmodMethod · 0.36
test_quantizeMethod · 0.36
test_py_rescaleMethod · 0.36
test_parse_floatMethod · 0.36