]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
- fixed typos
[ginac.git] / ginac / mul.cpp
index a4bb802ec9475c6b8f87ac4becbeaaf22b13cea5..3dfe48ebd387bcf8a62671a34a82b1d63c4da310 100644 (file)
@@ -144,7 +144,7 @@ void mul::print(const print_context & c, unsigned level) const
                        overall_coeff.bp->print(c, precedence());
                        c.s << "*";
                }
-       
+
                // Print arguments, separated by "*" or "/"
                epvector::const_iterator it = seq.begin(), itend = seq.end();
                while (it != itend) {
@@ -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