Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-09-19 11:44:48


Author: pbristow
Date: 2007-09-19 11:44:45 EDT (Wed, 19 Sep 2007)
New Revision: 39389
URL: http://svn.boost.org/trac/boost/changeset/39389

Log:
warning suppression by comment unused name name, and casting T(0.1) to avoid warning C4244: 'argument' : conversion from 'double' to 'const
Text files modified:
   sandbox/math_toolkit/libs/math/test/test_minima.cpp | 14 ++++++++------
   1 files changed, 8 insertions(+), 6 deletions(-)

Modified: sandbox/math_toolkit/libs/math/test/test_minima.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_minima.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_minima.cpp 2007-09-19 11:44:45 EDT (Wed, 19 Sep 2007)
@@ -1,4 +1,6 @@
-// (C) Copyright John Maddock 2006.
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2007.
+
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,20 +22,20 @@
 };
 
 template <class T>
-void test_minima(T, const char* name)
+void test_minima(T, const char* /* name */)
 {
    std::pair<T, T> m = boost::math::tools::brent_find_minima(poly_test<T>(), T(-10), T(10), 50);
- BOOST_CHECK_CLOSE(m.first, T(3), 0.001);
- BOOST_CHECK_CLOSE(m.second, T(4), 0.001);
+ BOOST_CHECK_CLOSE(m.first, T(3), T(0.001));
+ BOOST_CHECK_CLOSE(m.second, T(4), T(0.001));
 
    T (*fp)(T);
    fp = boost::math::lgamma;
 
    m = boost::math::tools::brent_find_minima(fp, T(0.5), T(10), 50);
- BOOST_CHECK_CLOSE(m.first, T(1.461632), 0.1);
+ BOOST_CHECK_CLOSE(m.first, T(1.461632), T(0.1));
    fp = boost::math::tgamma;
    m = boost::math::tools::brent_find_minima(fp, T(0.5), T(10), 50);
- BOOST_CHECK_CLOSE(m.first, T(1.461632), 0.1);
+ BOOST_CHECK_CLOSE(m.first, T(1.461632), T(0.1));
 }
 
 int test_main(int, char* [])


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