numbers.Real
¶
-
class
numbers.
Real
[source]¶ To Complex, Real adds the operations that work on real numbers.
In short, those are: a conversion to float, trunc(), divmod, %, <, <=, >, and >=.
Real also provides defaults for the derived operations.
Methods¶
__abs__ () |
Returns the Real distance from 0. |
__add__ (other) |
self + other |
__complex__ (self) == complex(float(self), 0) |
|
__div__ (other) |
self / other without __future__ division |
__divmod__ (other) |
divmod(self, other): The pair (self // other, self % other). |
__eq__ (other) |
self == other |
__float__ () |
Any Real can be converted to a native float object. |
__floordiv__ (other) |
self // other: The floor() of self/other. |
__format__ |
default object formatter |
__le__ (other) |
self <= other |
__lt__ (other) |
self < other |
__mod__ (other) |
self % other |
__mul__ (other) |
self * other |
__ne__ (other) |
self != other |
__neg__ () |
-self |
__new__ ((S, ...) |
|
__nonzero__ () |
True if self != 0. |
__pos__ () |
+self |
__pow__ (exponent) |
self**exponent; should promote to float or complex when necessary. |
__radd__ (other) |
other + self |
__rdiv__ (other) |
other / self without __future__ division |
__rdivmod__ (other) |
divmod(other, self): The pair (self // other, self % other). |
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__rfloordiv__ (other) |
other // self: The floor() of other/self. |
__rmod__ (other) |
other % self |
__rmul__ (other) |
other * self |
__rpow__ (base) |
base ** self |
__rsub__ (other) |
other - self |
__rtruediv__ (other) |
other / self with __future__ division |
__sizeof__ (() -> int) |
size of object in memory, in bytes |
__sub__ (other) |
self - other |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
__truediv__ (other) |
self / other with __future__ division. |
__trunc__ () |
trunc(self): Truncates self to an Integral. |
conjugate () |
Conjugate is a no-op for Reals. |