Mercurial > octave-nkf
comparison liboctave/array/dMatrix.cc @ 18884:479d1d3cb5c3
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Jun 2014 18:08:00 -0400 |
parents | aa9ca67f09fb b314efd58072 |
children | d20c81d3cd21 |
comparison
equal
deleted
inserted
replaced
18883:aa9ca67f09fb | 18884:479d1d3cb5c3 |
---|---|
2318 | 2318 |
2319 // We compute the size of iwork because DGELSD in older versions | 2319 // We compute the size of iwork because DGELSD in older versions |
2320 // of LAPACK does not return it on a query call. | 2320 // of LAPACK does not return it on a query call. |
2321 double dminmn = static_cast<double> (minmn); | 2321 double dminmn = static_cast<double> (minmn); |
2322 double dsmlsizp1 = static_cast<double> (smlsiz+1); | 2322 double dsmlsizp1 = static_cast<double> (smlsiz+1); |
2323 #if defined (HAVE_LOG2) | 2323 double tmp = xlog2 (dminmn / dsmlsizp1); |
2324 double tmp = log2 (dminmn / dsmlsizp1); | 2324 |
2325 #else | |
2326 double tmp = log (dminmn / dsmlsizp1) / log (2.0); | |
2327 #endif | |
2328 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; | 2325 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; |
2329 if (nlvl < 0) | 2326 if (nlvl < 0) |
2330 nlvl = 0; | 2327 nlvl = 0; |
2331 | 2328 |
2332 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; | 2329 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; |
2509 | 2506 |
2510 // We compute the size of iwork because DGELSD in older versions | 2507 // We compute the size of iwork because DGELSD in older versions |
2511 // of LAPACK does not return it on a query call. | 2508 // of LAPACK does not return it on a query call. |
2512 double dminmn = static_cast<double> (minmn); | 2509 double dminmn = static_cast<double> (minmn); |
2513 double dsmlsizp1 = static_cast<double> (smlsiz+1); | 2510 double dsmlsizp1 = static_cast<double> (smlsiz+1); |
2514 #if defined (HAVE_LOG2) | 2511 double tmp = xlog2 (dminmn / dsmlsizp1); |
2515 double tmp = log2 (dminmn / dsmlsizp1); | 2512 |
2516 #else | |
2517 double tmp = log (dminmn / dsmlsizp1) / log (2.0); | |
2518 #endif | |
2519 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; | 2513 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; |
2520 if (nlvl < 0) | 2514 if (nlvl < 0) |
2521 nlvl = 0; | 2515 nlvl = 0; |
2522 | 2516 |
2523 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; | 2517 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; |