sympy/sympy — pull request #2126 by mattpap (2013-05-19 21:45:03+00:00)
Title: WIP: Incremental progress on sparse polynomials

The name of this branch (`new-polys`) may be a bit confusing, because it doesn't go that far, but there is enough work done to merge it soon. In this branch:

- [x] improved support for real and complex domains (previously #1921)
- [x] switched PolynomialRing and FractionField to use PolyElement and FracElement instead of DMP and DMF
- [x] use code generation to improve speed of monomial ops (instead of looping over items of monomials, unpack monomial tuples and execute every op explicitly, see `MonomialOps`)
- [x] other optimizations to PolyElement, FracElement and PythonRational (some significant)
- [x] added caching of PolyRing and FracField (faster `==` or just use `is`)
- [x] added `@public` decorator (very rough and limited implementation)
- [x] started cleanup of polys' modules (for now split monomialtools.py into monomials.py and orderings.py)

What remains to do is to:

- [ ] fix two test failures in test_risch.py (test_residue_reduce, test_integrate_nonlinear_no_specials)
- [ ] fix test failure in test_solvers.py (test_exclude)
- [ ] fix very weird doctest import failure in Py3 (`bin/doctest sympy/polys` crashes)

There is one downside of this PR. I couldn't, yet, remove old PolynomialRing and FractionField (those using DMP and DMF), because I didn't want to dig into agca module. I will rewrite agca at some point, unless someone would like to step up (@ness01?).