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

Method is_normal

Lib/_pydecimal.py:3100–3106  ·  view source on GitHub ↗

Return True if self is a normal number; otherwise return False.

(self, context=None)

Source from the content-addressed store, hash-verified

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."""
3102 if self._is_special or not self:
3103 return False
3104 if context is None:
3105 context = getcontext()
3106 return context.Emin <= self.adjusted()
3107
3108 def is_qnan(self):
3109 """Return True if self is a quiet NaN; otherwise return False."""

Callers 4

test_none_argsMethod · 0.95
is_normalMethod · 0.45
test_named_parametersMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 2

adjustedMethod · 0.95
getcontextFunction · 0.85

Tested by 3

test_none_argsMethod · 0.76
test_named_parametersMethod · 0.36
test_implicit_contextMethod · 0.36