2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-29 19:52:08 +00:00
Files
math/test/compile_test/tools_roots_inc_test.cpp
John Maddock 3d9e81a67e Added needed using declaration to cauchy.hpp.
Added needed #include to config.hpp.
Tightened up compile-tests.
Fixed compile tests so they build with VC++ earlier than VC8sp1.

[SVN r39471]
2007-09-22 09:17:21 +00:00

35 lines
1.3 KiB
C++

// Copyright John Maddock 2006.
// 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)
//
// Basic sanity check that header <boost/math/tools/roots.hpp>
// #includes all the files that it needs to.
//
#include <boost/math/tools/roots.hpp>
//
// Note this header includes no other headers, this is
// important if this test is to be meaningful:
//
#include "test_compile_result.hpp"
void check()
{
typedef double (*F)(double);
typedef std::pair<double, double> (*F2)(double);
typedef std::tr1::tuple<double, double, double> (*F3)(double);
typedef boost::math::tools::eps_tolerance<double> Tol;
Tol tol(u);
boost::uintmax_t max_iter = 0;
F f = 0;
F2 f2 = 0;
F3 f3 = 0;
check_result<std::pair<double, double> >(boost::math::tools::bisect<F, double, Tol>(f, d, d, tol, max_iter));
check_result<std::pair<double, double> >(boost::math::tools::bisect<F, double, Tol>(f, d, d, tol));
check_result<double>(boost::math::tools::newton_raphson_iterate<F2, double>(f2, d, d, d, i, max_iter));
check_result<double>(boost::math::tools::halley_iterate<F3, double>(f3, d, d, d, i, max_iter));
check_result<double>(boost::math::tools::schroeder_iterate<F3, double>(f3, d, d, d, i, max_iter));
}