Returns whether the number is not actually one. 0 if a number 1 if NaN 2 if sNaN
(self)
| 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 |
no outgoing calls
no test coverage detected