test_cpp_dec_float_serial.cpp 777 B

1234567891011121314151617181920212223242526272829303132
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2013 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. //
  6. // Compare arithmetic results using fixed_int to GMP results.
  7. //
  8. #ifdef _MSC_VER
  9. #define _SCL_SECURE_NO_WARNINGS
  10. #endif
  11. #include <boost/multiprecision/cpp_dec_float.hpp>
  12. #include "test_float_serial.hpp"
  13. #if !defined(TEST1) && !defined(TEST2)
  14. #define TEST1
  15. #define TEST2
  16. #endif
  17. int main()
  18. {
  19. using namespace boost::multiprecision;
  20. #ifdef TEST1
  21. test<cpp_dec_float_50>();
  22. #endif
  23. #ifdef TEST2
  24. test<number<cpp_dec_float<100, boost::int64_t, std::allocator<char> > > >();
  25. #endif
  26. return boost::report_errors();
  27. }