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

Method is_normal

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

3095 return self._exp in ('n', 'N')
3096
3097 def is_normal(self, context=None):
3098 """Return True if self is a normal number; otherwise return False."""
3099 if self._is_special or not self:
3100 return False
3101 if context is None:
3102 context = getcontext()
3103 return context.Emin <= self.adjusted()
3104
3105 def is_qnan(self):
3106 """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