summaryrefslogtreecommitdiff
path: root/boost/libs/math/test/test_binomial_coeff.hpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:18:20 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:18:20 +0200
commita8edac06b534058e52126c4d55e23b217df2df91 (patch)
treef2c3567fae58aad676d544ee8f07ac78dd2eb1ec /boost/libs/math/test/test_binomial_coeff.hpp
parent4f6c0156a70e8f2ff70fe5a1a39f5e9b22ffd026 (diff)
parent32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (diff)
Update upstream source from tag 'upstream/2.2.0_rc1+repack'
Update to upstream version '2.2.0~rc1+repack' with Debian dir fe177bc6cd2d4c1256a3775504f6010be54e7463
Diffstat (limited to 'boost/libs/math/test/test_binomial_coeff.hpp')
-rw-r--r--boost/libs/math/test/test_binomial_coeff.hpp80
1 files changed, 0 insertions, 80 deletions
diff --git a/boost/libs/math/test/test_binomial_coeff.hpp b/boost/libs/math/test/test_binomial_coeff.hpp
deleted file mode 100644
index 0b0a3ebc..00000000
--- a/boost/libs/math/test/test_binomial_coeff.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright John Maddock 2006.
-// Copyright Paul A. Bristow 2007, 2009
-// 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)
-
-#include <boost/math/concepts/real_concept.hpp>
-#define BOOST_TEST_MAIN
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-#include <boost/math/special_functions/binomial.hpp>
-#include <boost/math/special_functions/trunc.hpp>
-#include <boost/math/tools/test.hpp>
-#include "functor.hpp"
-#include <boost/array.hpp>
-#include <iostream>
-#include <iomanip>
-
-#include "handle_test_result.hpp"
-#include "table_type.hpp"
-
-#ifndef SC_
-#define SC_(x) static_cast<typename table_type<T>::type>(BOOST_JOIN(x, L))
-#endif
-
-template <class T>
-T binomial_wrapper(T n, T k)
-{
-#ifdef BINOMIAL_FUNCTION_TO_TEST
- return BINOMIAL_FUNCTION_TO_TEST(
- boost::math::itrunc(n),
- boost::math::itrunc(k));
-#else
- return boost::math::binomial_coefficient<T>(
- boost::math::itrunc(n),
- boost::math::itrunc(k));
-#endif
-}
-
-template <class T>
-void test_binomial(T, const char* type_name)
-{
-#if !(defined(ERROR_REPORTING_MODE) && !defined(BINOMIAL_FUNCTION_TO_TEST))
- using namespace std;
-
- typedef T (*func_t)(T, T);
-#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS)
- func_t f = &binomial_wrapper<T>;
-#else
- func_t f = &binomial_wrapper;
-#endif
-
-#include "binomial_data.ipp"
-
- boost::math::tools::test_result<T> result = boost::math::tools::test_hetero<T>(
- binomial_data,
- bind_func<T>(f, 0, 1),
- extract_result<T>(2));
-
- std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
- "Test results for small arguments and type " << type_name << std::endl << std::endl;
- std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
- handle_test_result(result, binomial_data[result.worst()], result.worst(), type_name, "binomial_coefficient", "Binomials: small arguments");
- std::cout << std::endl;
-
-#include "binomial_large_data.ipp"
-
- result = boost::math::tools::test_hetero<T>(
- binomial_large_data,
- bind_func<T>(f, 0, 1),
- extract_result<T>(2));
-
- std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
- "Test results for large arguments and type " << type_name << std::endl << std::endl;
- std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
- handle_test_result(result, binomial_large_data[result.worst()], result.worst(), type_name, "binomial_coefficient", "Binomials: large arguments");
- std::cout << std::endl;
-#endif
-}
-