From: Richard Kreckel Date: Fri, 23 Sep 2005 00:02:29 +0000 (+0000) Subject: * Fix a bug that selected the wrong algorithm for determinants of purely X-Git-Tag: release_1-4-0~151 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=d744dbc38e4035c30abf07314c4dab19deb391e6 * Fix a bug that selected the wrong algorithm for determinants of purely numeric matrices with at least one floating point element. --- diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index 3cc20039..623537fe 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -730,12 +730,12 @@ ex matrix::determinant(unsigned algo) const unsigned sparse_count = 0; // counts non-zero elements exvector::const_iterator r = m.begin(), rend = m.end(); while (r != rend) { + if (!r->info(info_flags::numeric)) + numeric_flag = false; exmap srl; // symbol replacement list ex rtest = r->to_rational(srl); if (!rtest.is_zero()) ++sparse_count; - if (!rtest.info(info_flags::numeric)) - numeric_flag = false; if (!rtest.info(info_flags::crational_polynomial) && rtest.info(info_flags::rational_function)) normal_flag = true;