Lines Matching refs:Decimal
505 class Decimal(object): class
589 if isinstance(value, Decimal):
650 value = Decimal.from_float(value)
693 if cls is Decimal:
932 return Decimal(self._cmp(other))
966 if Decimal.from_float(self_as_float) == self:
1098 ans = Decimal(self)
1145 return Decimal(self)
1147 return Decimal(other) # Can't both be infinity here
1206 ans = Decimal(result)
1499 ans = Decimal(self)
1610 return Decimal(0)
1636 return Decimal(self)
1654 return Decimal(self)
1667 return Decimal(self)
1728 return Decimal(self)
2439 return Decimal(self) # if both are inf, it is OK
2518 return Decimal(self)
2553 return Decimal(self)
2577 return Decimal(self)
2579 return Decimal(self)
2602 return Decimal(self)
2604 return Decimal(self)
2622 return Decimal(self)
2951 return Decimal(self)
3193 ans = Decimal(self._exp + len(self._int) - 1)
3244 ans = Decimal(self.adjusted())
3528 return Decimal(10)
3547 return Decimal(self)
3582 return Decimal(self)
3605 return Decimal(self)
3631 if type(self) is Decimal:
3636 if type(self) is Decimal:
3732 self = object.__new__(Decimal)
3743 _numbers.Number.register(Decimal)
3933 d = Decimal(num, context=self)
3953 d = Decimal.from_float(f) # An exact conversion
4145 return Decimal(a)
5109 return Decimal(10)
5449 elif isinstance(value, Decimal):
5863 if isinstance(other, Decimal):
5866 return Decimal(other)
5868 return Decimal.from_float(other)
6207 _Infinity = Decimal('Inf')
6208 _NegativeInfinity = Decimal('-Inf')
6209 _NaN = Decimal('NaN')
6210 _Zero = Decimal(0)
6211 _One = Decimal(1)
6212 _NegativeOne = Decimal(-1)