fractions.Decimal.same_quantum

Decimal.same_quantum(other)[source]

Return True if self and other have the same exponent; otherwise return False.

If either operand is a special value, the following rules are used:
  • return True if both operands are infinities
  • return True if both operands are NaNs
  • otherwise, return False.