[GiNaC-devel] [PATCH] gcd: fix heuristics to chose main variable properly

Richard B. Kreckel kreckel at ginac.de
Sun Dec 3 18:47:23 CET 2006


Alexei Sheplyakov wrote:

>Heuristic code in gcd [very] often makes bad choice of the main variable.
>In particular, if one of polynomials (say, p2) does not contain
>the variable x which _is contained_ in another one (say, p1), than
>gcd(p1, p2) will use such a variable as a main, so subsequent calculation
>becomes unnecessary complicated. Fixing this substantially improves worst
>case performance (less than minute versus infinity).
>  
>

I've just applied your patch to the main branch. Thanks.

 -richy.

-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the GiNaC-devel mailing list