X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fmul.cpp;h=3dfe48ebd387bcf8a62671a34a82b1d63c4da310;hp=cb6794323b8cb96911b40e3dc14d2b125d3edd6e;hb=b617b5cf86e6f8ac01a339d9747c535257fcf8d0;hpb=0917777d60656298ba44e092712c2b403bfaf559 diff --git a/ginac/mul.cpp b/ginac/mul.cpp index cb679432..3dfe48eb 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -408,7 +408,8 @@ ex mul::evalf(int level) const ex mul::evalm(void) const { // numeric*matrix - if (seq.size() == 1 && is_ex_of_type(seq[0].rest, matrix)) + if (seq.size() == 1 && seq[0].coeff.is_equal(_ex1()) + && is_ex_of_type(seq[0].rest, matrix)) return ex_to_matrix(seq[0].rest).mul(ex_to_numeric(overall_coeff)); // Evaluate children first, look whether there are any matrices at all