test_divide_native_results.hpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef BOOST_SAFE_NUMERICS_TEST_DIVIDE_NATIVE_RESULTS_HPP
  2. #define BOOST_SAFE_NUMERICS_TEST_DIVIDE_NATIVE_RESULTS_HPP
  3. // Copyright (c) 2019 Robert Ramey
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #include "test_values.hpp"
  9. // note: These tables presume that the the size of an int is 32 bits.
  10. // This should be changed for a different architecture or better yet
  11. // be dynamically adjusted depending on the indicated architecture
  12. constexpr const char *test_division_native_result[
  13. boost::mp11::mp_size<test_values>::value
  14. ] = {
  15. // 0 0 0 0
  16. // 012345670123456701234567012345670
  17. // 012345678901234567890123456789012
  18. /* 0*/ "................................x",
  19. /* 1*/ "................................x",
  20. /* 2*/ "........................xxxxxxxxx",
  21. /* 3*/ "........................xxxxxxxxx",
  22. /* 4*/ "................................x",
  23. /* 5*/ "................................x",
  24. /* 6*/ "........................xxxxxxxxx",
  25. /* 7*/ "........................xxxxxxxxx",
  26. /* 8*/ "................................x",
  27. /* 9*/ "................................x",
  28. /*10*/ "...x...x...x............xxxxxxxxx",
  29. /*11*/ "........................xxxxxxxxx",
  30. /*12*/ "................................x",
  31. /*13*/ "................................x",
  32. /*14*/ "...x...x...x...x............xxxxx",
  33. /*15*/ "............................xxxxx",
  34. // 0 0 0 0
  35. // 012345670123456701234567012345670
  36. // 012345678901234567890123456789012
  37. /*16*/ "................................x",
  38. /*17*/ "................................x",
  39. /*18*/ "................................x",
  40. /*19*/ "................................x",
  41. /*20*/ "................................x",
  42. /*21*/ "................................x",
  43. /*22*/ "................................x",
  44. /*23*/ "................................x",
  45. /*24*/ "..xx..xx..xx....................x",
  46. /*25*/ "..xx..xx..xx....................x",
  47. /*26*/ "..xx..xx..xx....................x",
  48. /*27*/ "..xx..xx..xx....................x",
  49. /*28*/ "..xx..xx..xx..xx................x",
  50. /*29*/ "..xx..xx..xx..xx................x",
  51. /*30*/ "..xx..xx..xx..xx................x",
  52. /*31*/ "..xx..xx..xx..xx................x",
  53. /*32*/ "................................x"
  54. };
  55. #endif // BOOST_SAFE_NUMERICS_TEST_DIVIDE_NATIVE_RESULTS_HPP