|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58833 - sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver
From: rutger_at_[hidden]
Date: 2010-01-09 07:51:35
Author: rutger
Date: 2010-01-09 07:51:35 EST (Sat, 09 Jan 2010)
New Revision: 58833
URL: http://svn.boost.org/trac/boost/changeset/58833
Log:
fixed nlvl computation in geld
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp 2010-01-09 07:51:35 EST (Sat, 09 Jan 2010)
@@ -134,9 +134,9 @@
std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
std::ptrdiff_t smlsiz = ilaenv(9, "GELSD", "");
- std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(((std::log(
- static_cast<real_type>(minmn)) /
- std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(std::log(
+ static_cast<real_type>(minmn)/static_cast<real_type>(smlsiz+
+ 1))/std::log(2.0)) + 1;
BOOST_ASSERT( size(s) >= std::min< std::ptrdiff_t >(size_row(a),
size_column(a)) );
BOOST_ASSERT( size(work.select(fortran_int_t())) >=
@@ -174,9 +174,9 @@
std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
std::ptrdiff_t smlsiz = ilaenv(9, "GELSD", "");
- std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(((std::log(
- static_cast<real_type>(minmn)) /
- std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(std::log(
+ static_cast<real_type>(minmn)/static_cast<real_type>(smlsiz+
+ 1))/std::log(2.0)) + 1;
bindings::detail::array< real_type > tmp_work( min_size_work( minmn,
smlsiz, nlvl, size_column(b) ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
@@ -262,9 +262,9 @@
std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
std::ptrdiff_t smlsiz = ilaenv(9, "GELSD", "");
- std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(((std::log(
- static_cast<real_type>(minmn)) /
- std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(std::log(
+ static_cast<real_type>(minmn)/static_cast<real_type>(smlsiz+
+ 1))/std::log(2.0)) + 1;
BOOST_ASSERT( size(s) >= std::min< std::ptrdiff_t >(size_row(a),
size_column(a)) );
BOOST_ASSERT( size(work.select(fortran_int_t())) >=
@@ -305,9 +305,9 @@
std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
std::ptrdiff_t smlsiz = ilaenv(9, "GELSD", "");
- std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(((std::log(
- static_cast<real_type>(minmn)) /
- std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
+ std::ptrdiff_t nlvl = static_cast<std::ptrdiff_t>(std::log(
+ static_cast<real_type>(minmn)/static_cast<real_type>(smlsiz+
+ 1))/std::log(2.0)) + 1;
bindings::detail::array< value_type > tmp_work( min_size_work( minmn,
size_column(b) ) );
bindings::detail::array< real_type > tmp_rwork( min_size_rwork( minmn,
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk