Package sympycore :: Package arithmetic :: Package mpmath :: Module mptypes :: Class constant
[hide private]
[frames] | no frames]

Class constant

source code


Represents a mathematical constant with dynamic precision.
When printed or used in an arithmetic operation, a constant
is converted to a regular mpf at the working precision. A
regular mpf can also be obtained using the operation +x.



Nested Classes [hide private]

Inherited from mpf: __metaclass__

Instance Methods [hide private]
 
__repr__(self) source code

Inherited from mpf: __abs__, __add__, __cmp__, __complex__, __div__, __eq__, __float__, __ge__, __gt__, __hash__, __int__, __le__, __lt__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __pos__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __str__, __sub__, ae, binop, sqrt

Inherited from object: __delattr__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]
 
__new__(cls, func, name)
A new mpf can be created from a Python float, an int, a or a decimal string representing a number in floating-point format.
source code
Properties [hide private]
  val

Inherited from mpf: bc, exp, man, man_exp

Inherited from object: __class__

Method Details [hide private]

__new__(cls, func, name)
Static Method

source code 
A new mpf can be created from a Python float, an int, a
or a decimal string representing a number in floating-point
format. Examples:

    mpf(25)
    mpf(2.5)
    mpf('2.5')
    mpf('1.6e1000')

An mpf can also be created from a tuple (man, exp) or
(man, exp, bc):

    >>> mpf((3, -1))
    1.5

Overrides: mpf.__new__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
Overrides: mpf.__repr__

Property Details [hide private]

val

Get Method:
unreachable.val(self)