On Tue, Aug 18, 2009 at 5:48 PM, William Stein<wst...@gmail.com> wrote:
>
> On Tue, Aug 18, 2009 at 5:08 PM, Ondrej Certik<ond...@certik.cz> wrote:
>>
>> On Tue, Aug 18, 2009 at 4:56 PM, rjf<fate...@gmail.com> wrote:
>>>
>>>
>>> At the risk of providing some information about what is probably going
>>> on,
>>> let me suggest the following.
>>>
>>> 1. The expand() command in Maxima is almost always the wrong thing to
>>> do if the argument is a polynomial.
>>> ratexpand() or ratsimp() or rat()  will be much faster.  I suspect
>>> that in your timings of Maxima, the major
>>> contributor may be expand.
>>>
>>> 2. This is not a good test of polynomial factoring, because it does
>>> uses only a trivial part of the algorithm,
>>> and that is the square-free factoring part, that consists of computing
>>> P' a derivative of P and a gcd(P,P').
>>>
>>> Mostly you are testing the gcd program, but only the case of the gcd
>>> program for gcd(a,b) where, almost all
>>> the time, a divides b.  So you are not even testing the gcd program,
>>> you are testing polynomial division with remainder.
>>>
>>> Now if that is what you want to test, fine.  If you want to test
>>> polynomial factoring, there is a substantial
>>> literature on how to choose polynomials that are difficult to factor.
>>> Especially large degree is not really necessary.
>>>
>>> While it is only a speculation on my part, I think what you may also
>>> be timing is the conversion of
>>> relatively large character strings, at least in some cases.
>>>
>>> I hope you can straighten this out before you present your results at
>>> your conference.
>>
>> Thanks for joining the discussion. My presentation is on Thursday, so
>> I'll try to send my slides to sage+sympy lists tomorrow, so that you
>> can look at it and see if I say something that is unfair to Maxima, or
>> any other program.
>>
>> Does anyone know some real life applications of factor(<some
>> polynomial>)? E.g. simplifications, like canceling common factors from
>> nominator/denominator, but is there anything else?
>>
>> I would like to use some real life application as a benchmark, I just
>> don't know any.
>
> The following is basically a reinterpretation of factoring in one
> context, but it is easy to understand.  If you want to plot a plane
> algebraic curve F(X,Y) = 0, then if you factor F(X,Y) first as say g *
> h, then the plot of F=0 is the *union* of the plots of g=0 and h=0.
> This is because the zeros of F are the union of the zeros of g and h.
>  This extends to arbitrarily many factors.   So one application of
> factoring is to plotting algebraic curves.    There is a similar
> statement in dimension 3.

Ah, very cool. I apologize for a really naive question --- do you have
some more complex algebraic curve, that you used in some
publication/book or something? Let's use that as a benchmark.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to