test_carlson_3.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 TEST3
  9. #include <boost/math/special_functions/math_fwd.hpp>
  10. #include "libs/math/test/test_carlson.hpp"
  11. void expected_results()
  12. {
  13. //
  14. // Define the max and mean errors expected for
  15. // various compilers and platforms.
  16. //
  17. add_expected_result(
  18. ".*", // compiler
  19. ".*", // stdlib
  20. ".*", // platform
  21. ".*", // test type(s)
  22. ".*RJ.*", // test data group
  23. ".*", 2700, 250); // test function
  24. add_expected_result(
  25. ".*", // compiler
  26. ".*", // stdlib
  27. ".*", // platform
  28. ".*", // test type(s)
  29. ".*RD: y = z", // test data group
  30. ".*", 120, 30); // test function
  31. add_expected_result(
  32. ".*", // compiler
  33. ".*", // stdlib
  34. ".*", // platform
  35. ".*", // test type(s)
  36. ".*", // test data group
  37. ".*", 40, 20); // test function
  38. //
  39. // Finish off by printing out the compiler/stdlib/platform names,
  40. // we do this to make it easier to mark up expected error rates.
  41. //
  42. std::cout << "Tests run with " << BOOST_COMPILER << ", "
  43. << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
  44. }
  45. template <class T>
  46. void test(T t, const char* p)
  47. {
  48. test_spots(t, p);
  49. }
  50. BOOST_AUTO_TEST_CASE(test_main)
  51. {
  52. using namespace boost::multiprecision;
  53. expected_results();
  54. //
  55. // Test at:
  56. // 18 decimal digits: tests 80-bit long double approximations
  57. // 30 decimal digits: tests 128-bit long double approximations
  58. // 35 decimal digits: tests arbitrary precision code
  59. //
  60. ALL_TESTS
  61. }