| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
Fmpz_poly
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
File: sage/libs/flint/fmpz_poly.pyx (starting at line 145)
Add together two Flint polynomials.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: Fmpz_poly([1,2,3]) + Fmpz_poly(range(6))
6 1 3 5 3 4 5
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 262)
Return left // right, truncated.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([3,4,5])
sage: g = f^5; g
11 243 1620 6345 16560 32190 47224 53650 46000 29375 12500 3125
sage: g // f
9 81 432 1404 2928 4486 4880 3900 2000 625
sage: f^4
9 81 432 1404 2928 4486 4880 3900 2000 625
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 86)
Return the $i$-th item of self, which is the coefficient of the $x^i$ term.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly(range(100))
sage: f[13]
13
sage: f[200]
0
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 188)
Return the product of left and right.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([0,1]); g = Fmpz_poly([2,3,4])
sage: f*g
4 0 2 3 4
sage: f = Fmpz_poly([1,0,-1]); g = Fmpz_poly([2,3,4])
sage: f*g
5 2 3 2 -3 -4
Scalar multiplication
sage: f * 3
3 3 0 -3
sage: f * 5r
3 5 0 -5
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 175)
Return the negative of self.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: -Fmpz_poly([2,10,2,3,18,-5])
6 -2 -10 -2 -3 -18 5
|
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 102)
Print self according to the native FLINT format.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([0,1]); f^7
8 0 0 0 0 0 0 0 1
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 160)
Subtract two Flint polynomials.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: Fmpz_poly([10,2,3]) - Fmpz_poly([4,-2,1])
3 6 4 2
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 363)
Return self as an element of the sage ZZ[var].
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,1])
sage: f._sage_('t')
t + 1
sage: Fmpz_poly([-1,0,0,1])._sage_()
x^3 - 1
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 344)
Return the truncation of self at degree n.
Don't do this unless you know there are no other references to
this polynomial!!!!!
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,1])
sage: g = f**10; g
11 1 10 45 120 210 252 210 120 45 10 1
sage: g._unsafe_mutate_truncate(5); g
5 1 10 45 120 210
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 116)
The degree of self.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,2,3]); f
3 1 2 3
sage: f.degree()
2
sage: Fmpz_poly(range(1000)).degree()
999
sage: Fmpz_poly([2,0]).degree()
0
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 282)
Return self / other, self, % other.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,3,4,5])
sage: g = f^23
sage: g.div_rem(f)[1]
0
sage: g.div_rem(f)[0] - f^22
0
sage: f = Fmpz_poly([1..10])
sage: g = Fmpz_poly([1,3,5])
sage: q, r = f.div_rem(g)
sage: q*f+r
17 1 2 3 4 4 4 10 11 17 18 22 26 30 23 26 18 20
sage: g
3 1 3 5
sage: q*g+r
10 1 2 3 4 5 6 7 8 9 10
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 133)
Return self as a list of coefficients, lowest terms first.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([2,1,0,-1])
sage: f.list()
[2, 1, 0, -1]
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 241)
Return self raised to the power of exp mod x^n.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,2])
sage: f.pow_truncate(10,3)
3 1 20 180
sage: f.pow_truncate(1000,3)
3 1 2000 1998000
|
File: sage/libs/flint/fmpz_poly.pyx (starting at line 328)
Return the truncation of self at degree n.
EXAMPLES:
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: f = Fmpz_poly([1,1])
sage: g = f**10; g
11 1 10 45 120 210 252 210 120 45 10 1
sage: g.truncate(5)
5 1 10 45 120 210
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:43 2008 | http://epydoc.sourceforge.net |