test_ibeta_inv_ab_4.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2011 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
  5. #include "setup.hpp"
  6. #include "table_type.hpp"
  7. #define TEST_UDT
  8. #define TEST_DATA 4
  9. #define FULL_TEST
  10. #include <boost/math/special_functions/math_fwd.hpp>
  11. #include "libs/math/test/test_ibeta_inv_ab.hpp"
  12. void expected_results()
  13. {
  14. //
  15. // Define the max and mean errors expected for
  16. // various compilers and platforms.
  17. //
  18. add_expected_result(
  19. ".*", // compiler
  20. ".*", // stdlib
  21. ".*", // platform
  22. ".*", // test type(s)
  23. ".*", // test data group
  24. ".*", 10000, 1000); // test function
  25. //
  26. // Finish off by printing out the compiler/stdlib/platform names,
  27. // we do this to make it easier to mark up expected error rates.
  28. //
  29. std::cout << "Tests run with " << BOOST_COMPILER << ", "
  30. << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
  31. }
  32. template <class T>
  33. void test(T t, const char* p)
  34. {
  35. test_beta(t, p);
  36. }
  37. BOOST_AUTO_TEST_CASE(test_main)
  38. {
  39. using namespace boost::multiprecision;
  40. expected_results();
  41. //
  42. // Test at:
  43. // 18 decimal digits: tests 80-bit long double approximations
  44. // 30 decimal digits: tests 128-bit long double approximations
  45. // 35 decimal digits: tests arbitrary precision code
  46. //
  47. ALL_TESTS
  48. }