base_ring, [name=False], [sparse=None]) |
sage: Q = RationalField() sage: R = PolynomialRing(Q) sage: x = R.gen() sage: R(-1) + R(1) 0 sage: (x - Q('2/3'))*(x**2 - 8*x + 16) x^3 - 26/3*x^2 + 64/3*x - 32/3
base_ring,
characteristic,
cyclotomic_polynomial,
gen,
is_field,
is_sparse,
krull_dimension,
ngens,
parameter,
quotient,
random_element
Further documentation:
n) |
The nth cyclotomic polynomial.
sage: R = PolynomialRing(RationalField()) sage: R.cyclotomic_polynomial(8) x^4 + 1 sage: R.cyclotomic_polynomial(12) x^4 - x^2 + 1 sage: S = PolynomialRing(FiniteField(7)) sage: S.cyclotomic_polynomial(12) x^4 + 6*x^2 + 1
[n=0]) |
If this is R[x], return x.
degree, [bound=0]) |
Return a random polynomial.
INPUT: degree -- an int bound -- an int (default: 0, which tries to spread choice across ring, if implemented) OUTPUT: Polynomial -- A polynomial such that the coefficient of x^i, for i up to degree, are coercisions to the base ring of random integers between -bound and bound.
Instances of class PolynomialRing_generic also have the following special methods:
__call__,
__cmp__,
__reduce__,
__repr__,
_coerce_,
_latex_,
_PolynomialRing_generic__set_polynomial_class
See About this document... for information on suggesting changes.