Mercurial > octave-nkf
diff liboctave/array/dMatrix.cc @ 18882:b314efd58072 gui-release
maint: Periodic merge of stable to gui-release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Jun 2014 15:51:05 -0400 |
parents | 8e056300994b ff4da3c8ed16 |
children | 479d1d3cb5c3 |
line wrap: on
line diff
--- a/liboctave/array/dMatrix.cc Tue Jun 17 20:53:18 2014 +0200 +++ b/liboctave/array/dMatrix.cc Thu Jun 19 15:51:05 2014 -0400 @@ -2324,11 +2324,8 @@ // of LAPACK does not return it on a query call. double dminmn = static_cast<double> (minmn); double dsmlsizp1 = static_cast<double> (smlsiz+1); -#if defined (HAVE_LOG2) - double tmp = log2 (dminmn / dsmlsizp1); -#else - double tmp = log (dminmn / dsmlsizp1) / log (2.0); -#endif + double tmp = xlog2 (dminmn / dsmlsizp1); + octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; if (nlvl < 0) nlvl = 0; @@ -2515,11 +2512,8 @@ // of LAPACK does not return it on a query call. double dminmn = static_cast<double> (minmn); double dsmlsizp1 = static_cast<double> (smlsiz+1); -#if defined (HAVE_LOG2) - double tmp = log2 (dminmn / dsmlsizp1); -#else - double tmp = log (dminmn / dsmlsizp1) / log (2.0); -#endif + double tmp = xlog2 (dminmn / dsmlsizp1); + octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; if (nlvl < 0) nlvl = 0;