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

Method _isnan

Lib/_pydecimal.py:668–681  ·  view source on GitHub ↗

Returns whether the number is not actually one. 0 if a number 1 if NaN 2 if sNaN

(self)

Source from the content-addressed store, hash-verified

666 return cls(result)
667
668 def _isnan(self):
669 """Returns whether the number is not actually one.
670
671 0 if a number
672 1 if NaN
673 2 if sNaN
674 """
675 if self._is_special:
676 exp = self._exp
677 if exp == 'n':
678 return 1
679 elif exp == 'N':
680 return 2
681 return 0
682
683 def _isinfinity(self):
684 """Returns whether the number is infinite

Callers 11

_check_nansMethod · 0.95
__float__Method · 0.95
__int__Method · 0.95
_fixMethod · 0.95
_power_moduloMethod · 0.95
maxMethod · 0.95
minMethod · 0.95
compare_totalMethod · 0.95
max_magMethod · 0.95
min_magMethod · 0.95
create_decimalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected