On Tue, Aug 18, 2009 at 11:17 PM, rjf<fate...@gmail.com> wrote: > > Plotting algebraic curves == an application to pure math? Is that what > sympy is about?
we accept all reasonable patches to sympy, but my own need is in physics and engineering. I don't need any algebraic curves at all, but I also don't need factoring at all, except simplifications. But I do need integration, I'll ask Mateusz, who implemented the heuristic Risch in sympy, you are right that it is used there: sympy/integrals/risch.py:from sympy.polys import Poly, quo, gcd, lcm, root_facto sympy/integrals/risch.py: monomials, factor, PolynomialError sympy/integrals/risch.py: factorization = factor(poly, *V) sympy/integrals/risch.py: factorization = poly sympy/integrals/risch.py: if factorization.is_Mul: sympy/integrals/risch.py: reducibles |= set(factorization.args) sympy/integrals/risch.py: reducibles.add(factorization) sympy/integrals/risch.py: irreducibles |= set(root_factors(poly, z, d Thanks for this, you know sympy more than I do. :) > > > factoring is used in simplifying expressions in an attempt to reformat > them for easier comprehension. > Factoring is used by "solve" in the obvious way to separate solutions > exactly. > Factoring is sometimes used in partial fraction expansion to find > canonical simplified forms, and for finding > minimal representations in differential fields for the Risch > integration program. > factoring is used as a heuristic in integration for use in the > derivative-divides method. > > > You could find the source code directory for maxima and do grep > factor *.lisp and see what else comes up. > > I am, incidentally, surprised that you claim Maxima is fastest on one > of these benchmarks. After all, it is written in Lisp, > not C or Cython or whatever. Perhaps the convenience of writing in > Lisp is such an advantage that it was > possible to write a better algorithm in it? Or maybe the arithmetic, > which in this case is not so much of > huge size integers, is done faster in Lisp? Maybe the programs are > all essentially doing list processing most of > the time, and it turns out that list processing in Lisp is faster than > list processing in C or Cython. > > At least some Lisp systems have very good profiling systems that > could answer such questions. Maxima is the best. :) Ondrej --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---