From d744dbc38e4035c30abf07314c4dab19deb391e6 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Fri, 23 Sep 2005 00:02:29 +0000 Subject: [PATCH] * Fix a bug that selected the wrong algorithm for determinants of purely numeric matrices with at least one floating point element. --- ginac/matrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.44.0