From e7840acdcd84ea543486e85013b1f388375df5f2 Mon Sep 17 00:00:00 2001 From: Gunter Winkler Date: Wed, 12 Sep 2007 21:44:37 +0000 Subject: [PATCH] lu.hpp: introduced temporary to avoid strange compiler problem. --- include/boost/numeric/ublas/lu.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/lu.hpp b/include/boost/numeric/ublas/lu.hpp index 73b5fed2..7fc5bf74 100644 --- a/include/boost/numeric/ublas/lu.hpp +++ b/include/boost/numeric/ublas/lu.hpp @@ -101,7 +101,8 @@ namespace boost { namespace numeric { namespace ublas { matrix_column mci (column (m, i)); matrix_row mri (row (m, i)); if (m (i, i) != value_type/*zero*/()) { - project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i); + value_type m_inv = value_type (1) / m (i, i); + project (mci, range (i + 1, size1)) *= m_inv; } else if (singular == 0) { singular = i + 1; } @@ -144,7 +145,8 @@ namespace boost { namespace numeric { namespace ublas { } else { BOOST_UBLAS_CHECK (pm (i) == i_norm_inf, external_logic ()); } - project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i); + value_type m_inv = value_type (1) / m (i, i); + project (mci, range (i + 1, size1)) *= m_inv; } else if (singular == 0) { singular = i + 1; }