test_print_info_on_type.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright John Maddock 2010.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #include <boost/math/constants/info.hpp>
  7. #include <boost/math/concepts/real_concept.hpp>
  8. int main()
  9. {
  10. boost::math::constants::print_info_on_type<float>();
  11. boost::math::constants::print_info_on_type<double>();
  12. boost::math::constants::print_info_on_type<long double>();
  13. boost::math::constants::print_info_on_type<boost::math::concepts::real_concept>();
  14. return 0;
  15. }
  16. /*
  17. ------ Rebuild All started: Project: test_print_info_on_type, Configuration: Debug Win32 ------
  18. test_print_info_on_type.cpp
  19. test_print_info_on_type.vcxproj -> J:\Cpp\math_constants\Debug\test_print_info_on_type.exe
  20. Information on the Implementation and Handling of
  21. Mathematical Constants for Type float
  22. Checking for std::numeric_limits<float> specialisation: yes
  23. std::numeric_limits<float>::digits reports that the precision is
  24. 24 binary digits.
  25. boost::math::policies::precision<float, Policy> reports that the compile time precision is
  26. 24 binary digits.
  27. The constant will be constructed from a float.
  28. Information on the Implementation and Handling of
  29. Mathematical Constants for Type double
  30. Checking for std::numeric_limits<double> specialisation: yes
  31. std::numeric_limits<double>::digits reports that the precision is
  32. 53 binary digits.
  33. boost::math::policies::precision<double, Policy> reports that the compile time precision is
  34. 53 binary digits.
  35. The constant will be constructed from a double.
  36. Information on the Implementation and Handling of
  37. Mathematical Constants for Type long double
  38. Checking for std::numeric_limits<long double> specialisation: yes
  39. std::numeric_limits<long double>::digits reports that the precision is
  40. 53 binary digits.
  41. boost::math::policies::precision<long double, Policy> reports that the compile time precision is
  42. 53 binary digits.
  43. The constant will be constructed from a double.
  44. Information on the Implementation and Handling of
  45. Mathematical Constants for Type class boost::math::concepts::real_concept
  46. Checking for std::numeric_limits<class boost::math::concepts::real_concept> specialisation: no
  47. boost::math::policies::precision<class boost::math::concepts::real_concept, Policy>
  48. reports that there is no compile type precision available.
  49. boost::math::tools::digits<class boost::math::concepts::real_concept>()
  50. reports that the current runtime precision is
  51. 53 binary digits.
  52. No compile time precision is available, the construction method
  53. will be decided at runtime and results will not be cached
  54. - this may lead to poor runtime performance.
  55. Current runtime precision indicates that
  56. the constant will be constructed from a string on each call.
  57. ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
  58. */