Mercurial > octave-nkf
comparison liboctave/dMatrix.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 |
comparison
equal
deleted
inserted
replaced
7123:0b5807019172 | 7124:d07cb867891b |
---|---|
2106 // FIXME: Can SMLSIZ be other than 25? | 2106 // FIXME: Can SMLSIZ be other than 25? |
2107 octave_idx_type smlsiz = 25; | 2107 octave_idx_type smlsiz = 25; |
2108 | 2108 |
2109 // We compute the size of iwork because DGELSD in older versions | 2109 // We compute the size of iwork because DGELSD in older versions |
2110 // of LAPACK does not return it on a query call. | 2110 // of LAPACK does not return it on a query call. |
2111 double dminmn = static_cast<double> (minmn); | |
2112 double dsmlsizp1 = static_cast<double> (smlsiz+1); | |
2111 #if defined (HAVE_LOG2) | 2113 #if defined (HAVE_LOG2) |
2112 double tmp = log2 (minmn) / static_cast<double> (smlsiz+1) + 1; | 2114 double tmp = log2 (dminmn) / dsmlsizp1 + 1; |
2113 #else | 2115 #else |
2114 double tmp = log (minmn) / static_cast<double> (smlsiz+1) / log (2) + 1; | 2116 double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; |
2115 #endif | 2117 #endif |
2116 octave_idx_type nlvl = static_cast<int> (tmp); | 2118 octave_idx_type nlvl = static_cast<int> (tmp); |
2117 if (nlvl < 0) | 2119 if (nlvl < 0) |
2118 nlvl = 0; | 2120 nlvl = 0; |
2119 | 2121 |
2269 // FIXME: Can SMLSIZ be other than 25? | 2271 // FIXME: Can SMLSIZ be other than 25? |
2270 octave_idx_type smlsiz = 25; | 2272 octave_idx_type smlsiz = 25; |
2271 | 2273 |
2272 // We compute the size of iwork because DGELSD in older versions | 2274 // We compute the size of iwork because DGELSD in older versions |
2273 // of LAPACK does not return it on a query call. | 2275 // of LAPACK does not return it on a query call. |
2276 double dminmn = static_cast<double> (minmn); | |
2277 double dsmlsizp1 = static_cast<double> (smlsiz+1); | |
2274 #if defined (HAVE_LOG2) | 2278 #if defined (HAVE_LOG2) |
2275 double tmp = log2 (minmn) / static_cast<double> (smlsiz+1) + 1; | 2279 double tmp = log2 (dminmn) / dsmlsizp1 + 1; |
2276 #else | 2280 #else |
2277 double tmp = log (minmn) / static_cast<double> (smlsiz+1) / log (2) + 1; | 2281 double tmp = log (dminmn) / dsmlsizp1 / log (2.0) + 1; |
2278 #endif | 2282 #endif |
2279 octave_idx_type nlvl = static_cast<int> (tmp); | 2283 octave_idx_type nlvl = static_cast<int> (tmp); |
2280 if (nlvl < 0) | 2284 if (nlvl < 0) |
2281 nlvl = 0; | 2285 nlvl = 0; |
2282 | 2286 |