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

Method _isinfinity

Lib/_pydecimal.py:683–694  ·  view source on GitHub ↗

Returns whether the number is infinite 0 if finite or not a number 1 if +INF -1 if -INF

(self)

Source from the content-addressed store, hash-verified

681 return 0
682
683 def _isinfinity(self):
684 """Returns whether the number is infinite
685
686 0 if finite or not a number
687 1 if +INF
688 -1 if -INF
689 """
690 if self._exp == 'F':
691 if self._sign:
692 return -1
693 return 1
694 return 0
695
696 def _check_nans(self, other=None, context=None):
697 """Returns whether the number is not actually one.

Callers 15

_cmpMethod · 0.95
__add__Method · 0.95
__mul__Method · 0.95
__truediv__Method · 0.95
__divmod__Method · 0.95
__mod__Method · 0.95
remainder_nearMethod · 0.95
__floordiv__Method · 0.95
__int__Method · 0.95
__pow__Method · 0.95
quantizeMethod · 0.95
sqrtMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected