From 107f42727b2de9040a8b50ee2a2bf5d7c2408ac9 Mon Sep 17 00:00:00 2001 From: Vitaly Magerya Date: Tue, 9 Oct 2018 14:19:59 +0200 Subject: [PATCH 2/2] Fix matrix::division_free_elimination for unnormal zeros This fix makes the division_free_elimination function not really division-free, but at least it returns the correct result now. --- ginac/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index f5c99a37..dc2105ae 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -1470,7 +1470,7 @@ int matrix::division_free_elimination(const bool det) sign = -sign; for (unsigned r2=r0+1; r2m[r2*n+c] = (this->m[r0*n+c0]*this->m[r2*n+c] - this->m[r2*n+c0]*this->m[r0*n+c]).expand(); + this->m[r2*n+c] = (this->m[r0*n+c0]*this->m[r2*n+c] - this->m[r2*n+c0]*this->m[r0*n+c]).normal(); // fill up left hand side with zeros for (unsigned c=r0; c<=c0; ++c) this->m[r2*n+c] = _ex0; -- 2.17.1