Mercurial > hg > octave-nkf
comparison liboctave/array/fMatrix.cc @ 19038: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 |
comparison
equal
deleted
inserted
replaced
19030:e7b5be5a7f80 | 19038:b314efd58072 |
---|---|
2342 | 2342 |
2343 // We compute the size of iwork because DGELSD in older versions | 2343 // We compute the size of iwork because DGELSD in older versions |
2344 // of LAPACK does not return it on a query call. | 2344 // of LAPACK does not return it on a query call. |
2345 float dminmn = static_cast<float> (minmn); | 2345 float dminmn = static_cast<float> (minmn); |
2346 float dsmlsizp1 = static_cast<float> (smlsiz+1); | 2346 float dsmlsizp1 = static_cast<float> (smlsiz+1); |
2347 #if defined (HAVE_LOG2) | 2347 float tmp = xlog2 (dminmn / dsmlsizp1); |
2348 float tmp = log2 (dminmn / dsmlsizp1); | 2348 |
2349 #else | |
2350 float tmp = log (dminmn / dsmlsizp1) / log (2.0); | |
2351 #endif | |
2352 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; | 2349 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; |
2353 if (nlvl < 0) | 2350 if (nlvl < 0) |
2354 nlvl = 0; | 2351 nlvl = 0; |
2355 | 2352 |
2356 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; | 2353 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; |
2533 | 2530 |
2534 // We compute the size of iwork because DGELSD in older versions | 2531 // We compute the size of iwork because DGELSD in older versions |
2535 // of LAPACK does not return it on a query call. | 2532 // of LAPACK does not return it on a query call. |
2536 float dminmn = static_cast<float> (minmn); | 2533 float dminmn = static_cast<float> (minmn); |
2537 float dsmlsizp1 = static_cast<float> (smlsiz+1); | 2534 float dsmlsizp1 = static_cast<float> (smlsiz+1); |
2538 #if defined (HAVE_LOG2) | 2535 float tmp = xlog2 (dminmn / dsmlsizp1); |
2539 float tmp = log2 (dminmn / dsmlsizp1); | 2536 |
2540 #else | |
2541 float tmp = log (dminmn / dsmlsizp1) / log (2.0); | |
2542 #endif | |
2543 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; | 2537 octave_idx_type nlvl = static_cast<octave_idx_type> (tmp) + 1; |
2544 if (nlvl < 0) | 2538 if (nlvl < 0) |
2545 nlvl = 0; | 2539 nlvl = 0; |
2546 | 2540 |
2547 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; | 2541 octave_idx_type liwork = 3 * minmn * nlvl + 11 * minmn; |