Coverage for /usr/lib/python3/dist-packages/sympy/polys/__init__.py: 100%
19 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
1"""Polynomial manipulation algorithms and algebraic objects. """
3__all__ = [
4 'Poly', 'PurePoly', 'poly_from_expr', 'parallel_poly_from_expr', 'degree',
5 'total_degree', 'degree_list', 'LC', 'LM', 'LT', 'pdiv', 'prem', 'pquo',
6 'pexquo', 'div', 'rem', 'quo', 'exquo', 'half_gcdex', 'gcdex', 'invert',
7 'subresultants', 'resultant', 'discriminant', 'cofactors', 'gcd_list',
8 'gcd', 'lcm_list', 'lcm', 'terms_gcd', 'trunc', 'monic', 'content',
9 'primitive', 'compose', 'decompose', 'sturm', 'gff_list', 'gff',
10 'sqf_norm', 'sqf_part', 'sqf_list', 'sqf', 'factor_list', 'factor',
11 'intervals', 'refine_root', 'count_roots', 'real_roots', 'nroots',
12 'ground_roots', 'nth_power_roots_poly', 'cancel', 'reduced', 'groebner',
13 'is_zero_dimensional', 'GroebnerBasis', 'poly',
15 'symmetrize', 'horner', 'interpolate', 'rational_interpolate', 'viete',
17 'together',
19 'BasePolynomialError', 'ExactQuotientFailed', 'PolynomialDivisionFailed',
20 'OperationNotSupported', 'HeuristicGCDFailed', 'HomomorphismFailed',
21 'IsomorphismFailed', 'ExtraneousFactors', 'EvaluationFailed',
22 'RefinementFailed', 'CoercionFailed', 'NotInvertible', 'NotReversible',
23 'NotAlgebraic', 'DomainError', 'PolynomialError', 'UnificationFailed',
24 'GeneratorsError', 'GeneratorsNeeded', 'ComputationFailed',
25 'UnivariatePolynomialError', 'MultivariatePolynomialError',
26 'PolificationFailed', 'OptionError', 'FlagError',
28 'minpoly', 'minimal_polynomial', 'primitive_element', 'field_isomorphism',
29 'to_number_field', 'isolate', 'round_two', 'prime_decomp',
30 'prime_valuation', 'galois_group',
32 'itermonomials', 'Monomial',
34 'lex', 'grlex', 'grevlex', 'ilex', 'igrlex', 'igrevlex',
36 'CRootOf', 'rootof', 'RootOf', 'ComplexRootOf', 'RootSum',
38 'roots',
40 'Domain', 'FiniteField', 'IntegerRing', 'RationalField', 'RealField',
41 'ComplexField', 'PythonFiniteField', 'GMPYFiniteField',
42 'PythonIntegerRing', 'GMPYIntegerRing', 'PythonRational',
43 'GMPYRationalField', 'AlgebraicField', 'PolynomialRing', 'FractionField',
44 'ExpressionDomain', 'FF_python', 'FF_gmpy', 'ZZ_python', 'ZZ_gmpy',
45 'QQ_python', 'QQ_gmpy', 'GF', 'FF', 'ZZ', 'QQ', 'ZZ_I', 'QQ_I', 'RR',
46 'CC', 'EX', 'EXRAW',
48 'construct_domain',
50 'swinnerton_dyer_poly', 'cyclotomic_poly', 'symmetric_poly',
51 'random_poly', 'interpolating_poly',
53 'jacobi_poly', 'chebyshevt_poly', 'chebyshevu_poly', 'hermite_poly',
54 'hermite_prob_poly', 'legendre_poly', 'laguerre_poly',
56 'bernoulli_poly', 'bernoulli_c_poly', 'genocchi_poly', 'euler_poly',
57 'andre_poly',
59 'apart', 'apart_list', 'assemble_partfrac_list',
61 'Options',
63 'ring', 'xring', 'vring', 'sring',
65 'field', 'xfield', 'vfield', 'sfield'
66]
68from .polytools import (Poly, PurePoly, poly_from_expr,
69 parallel_poly_from_expr, degree, total_degree, degree_list, LC, LM,
70 LT, pdiv, prem, pquo, pexquo, div, rem, quo, exquo, half_gcdex, gcdex,
71 invert, subresultants, resultant, discriminant, cofactors, gcd_list,
72 gcd, lcm_list, lcm, terms_gcd, trunc, monic, content, primitive,
73 compose, decompose, sturm, gff_list, gff, sqf_norm, sqf_part,
74 sqf_list, sqf, factor_list, factor, intervals, refine_root,
75 count_roots, real_roots, nroots, ground_roots, nth_power_roots_poly,
76 cancel, reduced, groebner, is_zero_dimensional, GroebnerBasis, poly)
78from .polyfuncs import (symmetrize, horner, interpolate,
79 rational_interpolate, viete)
81from .rationaltools import together
83from .polyerrors import (BasePolynomialError, ExactQuotientFailed,
84 PolynomialDivisionFailed, OperationNotSupported, HeuristicGCDFailed,
85 HomomorphismFailed, IsomorphismFailed, ExtraneousFactors,
86 EvaluationFailed, RefinementFailed, CoercionFailed, NotInvertible,
87 NotReversible, NotAlgebraic, DomainError, PolynomialError,
88 UnificationFailed, GeneratorsError, GeneratorsNeeded,
89 ComputationFailed, UnivariatePolynomialError,
90 MultivariatePolynomialError, PolificationFailed, OptionError,
91 FlagError)
93from .numberfields import (minpoly, minimal_polynomial, primitive_element,
94 field_isomorphism, to_number_field, isolate, round_two, prime_decomp,
95 prime_valuation, galois_group)
97from .monomials import itermonomials, Monomial
99from .orderings import lex, grlex, grevlex, ilex, igrlex, igrevlex
101from .rootoftools import CRootOf, rootof, RootOf, ComplexRootOf, RootSum
103from .polyroots import roots
105from .domains import (Domain, FiniteField, IntegerRing, RationalField,
106 RealField, ComplexField, PythonFiniteField, GMPYFiniteField,
107 PythonIntegerRing, GMPYIntegerRing, PythonRational, GMPYRationalField,
108 AlgebraicField, PolynomialRing, FractionField, ExpressionDomain,
109 FF_python, FF_gmpy, ZZ_python, ZZ_gmpy, QQ_python, QQ_gmpy, GF, FF,
110 ZZ, QQ, ZZ_I, QQ_I, RR, CC, EX, EXRAW)
112from .constructor import construct_domain
114from .specialpolys import (swinnerton_dyer_poly, cyclotomic_poly,
115 symmetric_poly, random_poly, interpolating_poly)
117from .orthopolys import (jacobi_poly, chebyshevt_poly, chebyshevu_poly,
118 hermite_poly, hermite_prob_poly, legendre_poly, laguerre_poly)
120from .appellseqs import (bernoulli_poly, bernoulli_c_poly, genocchi_poly,
121 euler_poly, andre_poly)
123from .partfrac import apart, apart_list, assemble_partfrac_list
125from .polyoptions import Options
127from .rings import ring, xring, vring, sring
129from .fields import field, xfield, vfield, sfield