Mercurial > hg > octave-lyh
diff liboctave/dMatrix.cc @ 7367:600808df131c
[project @ 2008-01-14 08:58:02 by jwe]
author | jwe |
---|---|
date | Mon, 14 Jan 2008 08:58:02 +0000 |
parents | 7da4a5262e2e |
children | f9df7f7520e7 |
line wrap: on
line diff
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2111,11 +2111,11 @@ double dminmn = static_cast<double> (minmn); double dsmlsizp1 = static_cast<double> (smlsiz+1); #if defined (HAVE_LOG2) - double tmp = log2 (dminmn) / dsmlsizp1 + 1; + double tmp = log2 (dminmn / dsmlsizp1); #else - double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; + double tmp = log (dminmn / dsmlsizp1) / log (2.0); #endif - octave_idx_type nlvl = static_cast<int> (tmp); + octave_idx_type nlvl = static_cast<int> (tmp) + 1; if (nlvl < 0) nlvl = 0;