MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _isinfinity

Method _isinfinity

tools/python-3.11.9-amd64/Lib/_pydecimal.py:742–753  ·  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

740 return 0
741
742 def _isinfinity(self):
743 """Returns whether the number is infinite
744
745 0 if finite or not a number
746 1 if +INF
747 -1 if -INF
748 """
749 if self._exp == 'F':
750 if self._sign:
751 return -1
752 return 1
753 return 0
754
755 def _check_nans(self, other=None, context=None):
756 """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