Return True if the operand is a qNaN or sNaN; otherwise return False. >>> ExtendedContext.is_nan(Decimal('2.50')) False >>> ExtendedContext.is_nan(Decimal('NaN')) True >>> ExtendedContext.is_nan(Decimal('-sNaN')) True >>> ExtendedConte
(self, a)
| 4515 | return a.is_infinite() |
| 4516 | |
| 4517 | def is_nan(self, a): |
| 4518 | """Return True if the operand is a qNaN or sNaN; |
| 4519 | otherwise return False. |
| 4520 | |
| 4521 | >>> ExtendedContext.is_nan(Decimal('2.50')) |
| 4522 | False |
| 4523 | >>> ExtendedContext.is_nan(Decimal('NaN')) |
| 4524 | True |
| 4525 | >>> ExtendedContext.is_nan(Decimal('-sNaN')) |
| 4526 | True |
| 4527 | >>> ExtendedContext.is_nan(1) |
| 4528 | False |
| 4529 | """ |
| 4530 | a = _convert_other(a, raiseit=True) |
| 4531 | return a.is_nan() |
| 4532 | |
| 4533 | def is_normal(self, a): |
| 4534 | """Return True if the operand is a normal number; |