Mercurial > hg > octave-lyh
diff liboctave/CMatrix.cc @ 7124:d07cb867891b
[project @ 2007-11-08 01:09:44 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 01:09:44 +0000 |
parents | 6d3e53a2f963 |
children | 7da4a5262e2e |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -2498,10 +2498,12 @@ // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. + double dminmn = static_cast<double> (minmn); + double dsmlsizp1 = static_cast<double> (smlsiz+1); #if defined (HAVE_LOG2) - double tmp = log2 (minmn) / static_cast<double> (smlsiz+1) + 1; + double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else - double tmp = log (minmn) / static_cast<double> (smlsiz+1) / log (2) + 1; + double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast<int> (tmp); if (nlvl < 0) @@ -2668,10 +2670,12 @@ // We compute the size of rwork and iwork because ZGELSD in // older versions of LAPACK does not return them on a query // call. + double dminmn = static_cast<double> (minmn); + double dsmlsizp1 = static_cast<double> (smlsiz+1); #if defined (HAVE_LOG2) - double tmp = log2 (minmn) / static_cast<double> (smlsiz+1) + 1; + double tmp = log2 (dminmn) / dsmlsizp1 + 1; #else - double tmp = log (minmn) / static_cast<double> (smlsiz+1) / log (2) + 1; + double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; #endif octave_idx_type nlvl = static_cast<int> (tmp); if (nlvl < 0)