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

Method is_zero

tools/python-3.11.9-amd64/Lib/_pydecimal.py:4659–4674  ·  view source on GitHub ↗

Return True if the operand is a zero; otherwise return False. >>> ExtendedContext.is_zero(Decimal('0')) True >>> ExtendedContext.is_zero(Decimal('2.50')) False >>> ExtendedContext.is_zero(Decimal('-0E+2')) True >>> ExtendedContext.is_z

(self, a)

Source from the content-addressed store, hash-verified

4657 return a.is_subnormal(context=self)
4658
4659 def is_zero(self, a):
4660 """Return True if the operand is a zero; otherwise return False.
4661
4662 >>> ExtendedContext.is_zero(Decimal('0'))
4663 True
4664 >>> ExtendedContext.is_zero(Decimal('2.50'))
4665 False
4666 >>> ExtendedContext.is_zero(Decimal('-0E+2'))
4667 True
4668 >>> ExtendedContext.is_zero(1)
4669 False
4670 >>> ExtendedContext.is_zero(0)
4671 True
4672 """
4673 a = _convert_other(a, raiseit=True)
4674 return a.is_zero()
4675
4676 def ln(self, a):
4677 """Returns the natural (base e) logarithm of the operand.

Callers

nothing calls this directly

Calls 2

_convert_otherFunction · 0.85
is_zeroMethod · 0.45

Tested by

no test coverage detected