Home | Trees | Index | Help |
|
---|
Package sage :: Package rings :: Module power_series :: Class PowerSeries |
|
object
--+ |Element
--+ |Polynomial
--+ |Polynomial_generic_dense
--+ | PowerSeries
Method Summary | |
---|---|
__init__(self,
a,
x,
prec,
check)
| |
__add__(self,
right)
| |
Comparison of self and other. | |
__div__(self,
denom)
| |
__getitem__(self,
n)
| |
__getslice__(self,
i,
j)
| |
Inverse of the power series, which we assume to have nonzero constant term so that the inverse is again a power series. | |
Remainder of division of self by other. | |
EXAMPLES: | |
__pow__(self,
right)
| |
__radd__(self,
left)
| |
__rdiv__(self,
left)
| |
__repr__(self)
| |
__rmul__(self,
left)
| |
__setitem__(self,
n,
value)
| |
Returns the power series of precision at most prec got by adding O(q^prec) to f, where q is the variable. | |
Return a copy of 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)
| |
Return self + O(q**prec), computed quickly. | |
The precision of ...+O(q^r) is r.. | |
randomize(self,
degree,
bound)
| |
Polynomial obtained from power series by truncating. | |
Suppose self factors as q^n*(a_0 + a_1*q + ...) with a_0 nonzero. | |
If f = sum a_m*q^m, then this function returns sum a_m*q^(n*m). | |
variable(self)
| |
Inherited from Polynomial_generic_dense | |
| |
Return the degree of this polynomial. | |
| |
Inherited from Polynomial | |
Compute value of this polynomial at x. | |
| |
Quotient of division of self by other. | |
| |
| |
| |
| |
| |
| |
The difference self - right. | |
Return the base ring of the parent of self. | |
Returns the complex roots of this polynomial. | |
| |
| |
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. | |
Greatest common divisor of self and polynomial other. | |
| |
| |
Returns True if this polynomial is monic. | |
| |
| |
| |
| |
| |
| |
| |
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. | |
Extended gcd of self and polynomial other. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
__cmp__(self,
other)
|
__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
|
__mul__(self, right)EXAMPLES:>>> x = PolynomialRing(IntegerRing()).gen() >>> (x - 4)*(x**2 - 8*x + 16) x^3 - 12*x^2 + 48*x - 64
|
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
|
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() 1Next 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() 51Finally, 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'
|
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). |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon May 9 17:57:02 2005 | http://epydoc.sf.net |