Package sage :: Package rings :: Module power_series :: Class PowerSeries
[show private | hide private]
[frames | no frames]

Type PowerSeries

      object --+            
               |            
         Element --+        
                   |        
          Polynomial --+    
                       |    
Polynomial_generic_dense --+
                           |
                          PowerSeries


Method Summary
  __init__(self, a, x, prec, check)
  __add__(self, right)
  __cmp__(self, other)
Comparison of self and other.
  __div__(self, denom)
  __getitem__(self, n)
  __getslice__(self, i, j)
  __invert__(self)
Inverse of the power series, which we assume to have nonzero constant term so that the inverse is again a power series.
  __mod__(self, other)
Remainder of division of self by other.
  __mul__(self, right)
EXAMPLES:
  __pow__(self, right)
  __radd__(self, left)
  __rdiv__(self, left)
  __repr__(self)
  __rmul__(self, left)
  __setitem__(self, n, value)
  add_bigoh(self, prec)
Returns the power series of precision at most prec got by adding O(q^prec) to f, where q is the variable.
  copy(self)
Return a copy of self.
  denominator(self)
Return the least common multiple of the denominators of the entries of self, when this makes sense, i.e., when the coefficients have a denominator function.
  exp(self, prec)
  O(self, prec)
Return self + O(q**prec), computed quickly.
  prec(self)
The precision of ...+O(q^r) is r..
  randomize(self, degree, bound)
  trunc(self, prec)
Polynomial obtained from power series by truncating.
  unit_part(self)
Suppose self factors as q^n*(a_0 + a_1*q + ...) with a_0 nonzero.
  V(self, n)
If f = sum a_m*q^m, then this function returns sum a_m*q^(n*m).
  variable(self)
    Inherited from Polynomial_generic_dense
  __reduce__(self)
  degree(self)
Return the degree of this polynomial.
  list(self)
    Inherited from Polynomial
  __call__(self, x)
Compute value of this polynomial at x.
  __float__(self)
  __floordiv__(self, right)
Quotient of division of self by other.
  __hash__(self)
  __int__(self)
  __long__(self)
  __neg__(self)
  __pos__(self)
  __rsub__(self, left)
  __sub__(self, right)
The difference self - right.
  base_ring(self)
Return the base ring of the parent of self.
  complex_roots(self, flag)
Returns the complex roots of this polynomial.
  derivative(self)
  dict(self)
  factor(self)
Return polynomials f1, ..., fn and exponents e1, ..., en such that the gcd fo the coefficients of the fi is 1, and prod fi**ei is equal to a scalar multiple of self.
  gcd(self, other)
Greatest common divisor of self and polynomial other.
  is_gen(self)
  is_irreducible(self)
  is_monic(self)
Returns True if this polynomial is monic.
  is_nonzero(self)
  is_zero(self)
  leading(self)
  pari(self)
  polynomial(self, *args, **kwds)
  resultant(self, other, flag)
  reverse(self)
  valuation(self)
If f = a_r x^r + a_{r+1}x^{r+1} + higher terms ..., with a_r nonzero then the valuation of f is r.
  xgcd(self, other)
Extended gcd of self and polynomial other.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__cmp__(self, other)
(Comparison operator)

Comparison of self and other.

We say two approximate power series are equal, if they agree for all coefficients up to the *minimum* of the precisions of each. Thus, e.g., f=1+q+O(q^2) is equal to g=1+O(q). This is how PARI defines equality of power series, but not how MAGMA defines equality. (MAGMA would declare f and g unequal.) I side with PARI, because even if g=1+q+O(q^2), we don't really know whether f equals g, since we don't know the coefficients of q^2.
Overrides:
sage.rings.polynomial.Polynomial.__cmp__

__invert__(self)

Inverse of the power series, which we assume to have nonzero constant term so that the inverse is again a power series.

__mod__(self, other)

Remainder of division of self by other. EXAMPLES:
>>> x = PolynomialRing(IntegerRing()).gen()
>>> x % (x+1)
-1

>>> (x**3 + x - 1) % (x**2 - 1)
2*x - 1
Overrides:
sage.rings.polynomial.Polynomial.__mod__ (inherited documentation)

__mul__(self, right)

EXAMPLES:
>>> x = PolynomialRing(IntegerRing()).gen()
>>> (x - 4)*(x**2 - 8*x + 16)
x^3 - 12*x^2 + 48*x - 64
Overrides:
sage.rings.polynomial.Polynomial.__mul__ (inherited documentation)

add_bigoh(self, prec)

Returns the power series of precision at most prec got by adding O(q^prec) to f, where q is the variable.

copy(self)

Return a copy of self.

EXAMPLES: We create the polynomial f=x+3, then set g=f, and change the coefficient of x in g, which also changes the coefficient of x in f. If we instead copy f, then changing the coefficient of x of g does not change f.
>>> x = PolynomialRing(IntegerRing()).gen()
>>> f = x+3
>>> g = f
>>> g[1]=3
>>> f
3*x + 3

>>> g = f.copy()
>>> g[1]=5
>>> f
3*x + 3

>>> g
5*x + 3
Overrides:
sage.rings.polynomial.Polynomial.copy (inherited documentation)

denominator(self)

Return the least common multiple of the denominators of the entries of self, when this makes sense, i.e., when the coefficients have a denominator function.

WARNING: This is not the denominator of the rational function defined by self, which would always be 1 since self is a polynomial.

EXAMPLES: First we compute the denominator of a polynomial with integer coefficients, which is of course 1.
>>> x = PolynomialRing(IntegerRing()).gen()
>>> f = x**3 + 17*x + 1
>>> f.denominator()
1
Next we compute the denominator of a polynomial with rational coefficients.
>>> x = PolynomialRing(RationalField()).gen()
>>> f = '1/17'*x**19 - '2/3'*x + '1/3'; f
1/17*x^19 - 2/3*x + 1/3

>>> f.denominator()
51
Finally, we try to compute the denominator of a polynomial with coefficients in the real numbers, which is a ring whose elements do not have a denominator method.
>>> x = PolynomialRing(RealField()).gen()
>>> f = x + '1/3'; f
1.0*x + 0.333333333333333333333

>>> f.denominator()
Traceback (most recent call last):

...

AttributeError: 'RealNumber_mpf' object has no attribute 'denominator'
Overrides:
sage.rings.polynomial.Polynomial.denominator (inherited documentation)

O(self, prec)

Return self + O(q**prec), computed quickly. Does not change self.

prec(self)

The precision of ...+O(q^r) is r..

trunc(self, prec=Infinity)

Polynomial obtained from power series by truncating.

unit_part(self)

Suppose self factors as q^n*(a_0 + a_1*q + ...) with a_0 nonzero. Then this function returns a_0 + a_1*q + ...

unit_part():

V(self, n)

If f = sum a_m*q^m, then this function returns sum a_m*q^(n*m).

Generated by Epydoc 2.1 on Fri May 20 19:41:04 2005 http://epydoc.sf.net