[GiNaC-list] Problem in factor

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Tue Nov 20 07:42:15 CET 2012


Hi, Jens,

On Mon, Nov 19, 2012 at 10:46 PM, Jens Vollinga
<jens.vollinga at googlemail.com> wrote:

> Yes, the problem is inside GiNaC, not CLN. Actually, there seems to be a
> quick fix: replace in line 1512 of factor.cpp the cl_I's by cl_R's ...

factor_unimodular() assumes the polynomial to be in Z[x] (so one can
apply modular homomorphisms). Therefore the correct fix is to
transform polynomials over rationals into ones over integers. I'll
send a patch tomorrow.

> And why did this problem go unnoticed for so long?

I guess nobody have ever tried to factor polynomials over rationals so far.

Best regards,
        Alexei

P.S. Sent from my phone, sorry for a broken formatting.


More information about the GiNaC-list mailing list