|
_isnan(self)
Returns whether the number is not actually one. |
|
|
|
_isinfinity(self)
Returns whether the number is infinite |
|
|
|
_check_nans(self,
other=None,
context=None)
Returns whether the number is not actually one. |
|
|
|
|
|
__cmp__(self,
other,
context=None) |
|
|
|
|
|
|
|
compare(self,
other,
context=None)
Compares one to another. |
|
|
|
|
|
as_tuple(self)
Represents the number as a triple tuple. |
|
|
|
__repr__(self)
Represents the number as an instance of Decimal. |
|
|
|
__str__(self,
eng=0,
context=None)
Return string representation of the number in scientific notation. |
|
|
|
to_eng_string(self,
context=None)
Convert to engineering-type string. |
|
|
|
__neg__(self,
context=None)
Returns a copy with the sign switched. |
|
|
|
__pos__(self,
context=None)
Returns a copy, unless it is a sNaN. |
|
|
|
__abs__(self,
round=1,
context=None)
Returns the absolute value of self. |
|
|
|
__add__(self,
other,
context=None)
Returns self + other. |
|
|
|
__radd__(self,
other,
context=None)
Returns self + other. |
|
|
|
__sub__(self,
other,
context=None)
Return self + (-other) |
|
|
|
__rsub__(self,
other,
context=None)
Return other + (-self) |
|
|
|
_increment(self,
round=1,
context=None)
Special case of add, adding 1eExponent |
|
|
|
__mul__(self,
other,
context=None)
Return self * other. |
|
|
|
__rmul__(self,
other,
context=None)
Return self * other. |
|
|
|
__div__(self,
other,
context=None)
Return self / other. |
|
|
|
__truediv__(self,
other,
context=None)
Return self / other. |
|
|
|
_divide(self,
other,
divmod=0,
context=None)
Return a / b, to context.prec precision. |
|
|
|
__rdiv__(self,
other,
context=None)
Swaps self/other and returns __div__. |
|
|
|
__rtruediv__(self,
other,
context=None)
Swaps self/other and returns __div__. |
|
|
|
__divmod__(self,
other,
context=None)
(self // other, self % other) |
|
|
|
__rdivmod__(self,
other,
context=None)
Swaps self/other and returns __divmod__. |
|
|
|
__mod__(self,
other,
context=None)
self % other |
|
|
|
__rmod__(self,
other,
context=None)
Swaps self/other and returns __mod__. |
|
|
|
remainder_near(self,
other,
context=None)
Remainder nearest to 0- abs(remainder-near) <= other/2 |
|
|
|
__floordiv__(self,
other,
context=None)
self // other |
|
|
|
__rfloordiv__(self,
other,
context=None)
Swaps self/other and returns __floordiv__. |
|
|
|
__float__(self)
Float representation. |
|
|
|
__int__(self)
Converts self to an int, truncating if necessary. |
|
|
|
|
|
_fix(self,
context)
Round if it is necessary to keep self within prec precision. |
|
|
|
_fixexponents(self,
context)
Fix the exponents and return a copy with the exponent in bounds. |
|
|
|
_round(self,
prec=None,
rounding=None,
context=None)
Returns a rounded version of self. |
|
|
|
_round_down(self,
prec,
expdiff,
context)
Also known as round-towards-0, truncate. |
|
|
|
_round_half_up(self,
prec,
expdiff,
context,
tmp=None)
Rounds 5 up (away from 0) |
|
|
|
_round_half_even(self,
prec,
expdiff,
context)
Round 5 to even, rest to nearest. |
|
|
|
_round_half_down(self,
prec,
expdiff,
context)
Round 5 down |
|
|
|
_round_up(self,
prec,
expdiff,
context)
Rounds away from 0. |
|
|
|
_round_ceiling(self,
prec,
expdiff,
context)
Rounds up (not away from 0 if negative.) |
|
|
|
_round_floor(self,
prec,
expdiff,
context)
Rounds down (not towards 0 if negative) |
|
|
|
__pow__(self,
n,
modulo=None,
context=None)
Return self ** n (mod modulo) |
|
|
|
__rpow__(self,
other,
context=None)
Swaps self/other and returns __pow__. |
|
|
|
normalize(self,
context=None)
Normalize- strip trailing 0s, change anything equal to 0 to 0e0 |
|
|
|
quantize(self,
exp,
rounding=None,
context=None,
watchexp=1)
Quantize self so its exponent is the same as that of exp. |
|
|
|
same_quantum(self,
other)
Test whether self and other have the same exponent. |
|
|
|
_rescale(self,
exp,
rounding=None,
context=None,
watchexp=1)
Rescales so that the exponent is exp. |
|
|
|
to_integral(self,
rounding=None,
context=None)
Rounds to the nearest integer, without raising inexact, rounded. |
|
|
|
sqrt(self,
context=None)
Return the square root of self. |
|
|
|
max(self,
other,
context=None)
Returns the larger value. |
|
|
|
min(self,
other,
context=None)
Returns the smaller value. |
|
|
|
_isinteger(self)
Returns whether self is an integer |
|
|
|
_iseven(self)
Returns 1 if self is even. |
|
|
|
adjusted(self)
Return the adjusted exponent of self |
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__init__ ,
__reduce_ex__ ,
__setattr__
|