Boost C++ Libraries: Ticket #11294: Matrix Memory problem after using lu_factorize https://svn.boost.org/trac10/ticket/11294 <p> Discovered that after using lu_factorize the values of the matrix have changed! </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/date_time/posix_time/posix_time.hpp&gt; #include &lt;boost/numeric/ublas/matrix.hpp&gt; #include &lt;boost/numeric/ublas/matrix_proxy.hpp&gt; #include &lt;boost/numeric/ublas/vector.hpp&gt; #include &lt;boost/numeric/ublas/io.hpp&gt; #include &lt;boost/numeric/ublas/lu.hpp&gt; using namespace std; using namespace boost::numeric; int main() { ublas::matrix&lt;double&gt; X(3,3); X.clear(); X(0,0) = 0.995182407377577; X(0,1) =-0.006473367705848; X(0,2) =-0.002032391957706; X(1,0) =-0.006473367705848; X(1,1) = 0.995182407377577; X(1,2) =-0.002032391957706; X(2,0) =-0.002032391957706; X(2,1) =-0.002032391957706; X(2,2) = 0.936175146339137; cout&lt;&lt;setprecision(16)&lt;&lt;X&lt;&lt;endl; cout&lt;&lt;ublas::lu_factorize(X)&lt;&lt;endl; cout&lt;&lt;setprecision(16)&lt;&lt;X&lt;&lt;endl; cout&lt;&lt;ublas::lu_factorize(X)&lt;&lt;endl; cout&lt;&lt;setprecision(16)&lt;&lt;X&lt;&lt;endl; } </pre><p> Output: </p> <pre class="wiki">[3,3]((0.995182407377577,-0.006473367705848,-0.002032391957706),(-0.006473367705848,0.995182407377577,-0.002032391957706),(-0.002032391957706,-0.002032391957706,0.936175146339137)) 0 [3,3]((0.995182407377577,-0.006473367705848,-0.002032391957706),(-0.006504704723334175,0.9951403000320849,-0.002045612067272957),(-0.002042230592742885,-0.002055601674665375,0.9361667907625133)) 0 [3,3]((0.995182407377577,-0.006473367705848,-0.002032391957706),(-0.006536193440632496,0.9950979888485471,-0.002058896174255709),(-0.002052116855767581,-0.002079077442455779,0.9361583394521271)) </pre><p> Is this fixed in newer versions? </p> <p> Thanks </p> <p> Michael Cortis </p> <p> RA, Durham University </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11294 Trac 1.4.3