test_ellint_1.cpp 1.8 KB

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