[GiNaC-devel] Is this a bug?

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Fri Oct 8 22:22:54 CEST 2010


Hello Jan,

> Can it be that the nops() of the mul is (always) equal to seq.size() + 1?

nops() for a mul object is always seq.size() + 1

> These two vectors are sized to seq.size():
> std::vector<bool> subsed(seq.size(), false);
> std::vector<bool> currsubsed(seq.size(), false);
>
> They are then used in:
> algebraic_match_mul_with_mul()
>
> This iterates over the nops() of the mul:
> for (size_t i=0; i<e.nops(); ++i) {

In theory it's a bug. Those subsed and currsubsed arrays should
contain nops() elements instead of seq.size(). I'll post a fix soon.

Best regards,
             Alexei



More information about the GiNaC-devel mailing list