Package sage :: Package rings :: Module real_field :: Class RealField_decimal
[show private | hide private]
[frames | no frames]

Type RealField_decimal

      object --+    
               |    
        Ring --+    
               |    
       RealField --+
                   |
      object --+   |
               |   |
_uniq_RR_decimal --+
                   |
                  RealField_decimal


EXAMPLES:
>>> R = RealField_decimal(); S = RealField_mpf()
>>> R(1) + S(1)
2.0

>>> S(1.1) - R(1.2)
-0.0999999999999999111822

>>> R.pi() * S.pi()
9.869604401089358618834491000

>>> R(2)*S(2)
4.0

>>> S(2) / R(3)
0.666666666666666666667

>>> R(2) < S(3)
True

>>> S(2.99) > R(3)
False

Method Summary
  __call__(self, x)
  __cmp__(self, other)
  __repr__(self)
    Inherited from RealField
  __new__(cls, *args, **kwds)
(Static method)
  characteristic(self)
Returns the characteristic of the real field, which is 0.
  euler_constant(self, n)
Returns Euler's constant gamma = 0.57721566...
  is_field(self)
Returns True, since the real field is a field.
  name(self)
Returns a short string 'R' that describes the real field.
  pi(self, n)
Returns pi to at least the given precision.
    Inherited from Ring
  __init__(self)
  __hash__(self)
  is_atomic_repr(self)
True if the elements have atomic string representations, in the sense that they print if they print at s, then -s means the negative of s.
  type(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Generated by Epydoc 2.1 on Fri Jun 24 17:58:45 2005 http://epydoc.sf.net