test_arithmetic_mpfr.cpp 720 B

123456789101112131415161718192021222324
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2012 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. #ifdef _MSC_VER
  6. #define _SCL_SECURE_NO_WARNINGS
  7. #endif
  8. #include <boost/multiprecision/mpfr.hpp>
  9. #define TEST_MPFR
  10. #include "test_arithmetic.hpp"
  11. template <unsigned D>
  12. struct related_type<boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<D> > >
  13. {
  14. typedef boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<D / 2> > type;
  15. };
  16. int main()
  17. {
  18. test<boost::multiprecision::mpfr_float>();
  19. return boost::report_errors();
  20. }