round_fwd.hpp 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Copyright John Maddock 2008.
  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. #ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
  7. #define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
  8. #include <boost/math/tools/config.hpp>
  9. #include <boost/math/tools/promotion.hpp>
  10. #ifdef _MSC_VER
  11. #pragma once
  12. #endif
  13. namespace boost
  14. {
  15. namespace math
  16. {
  17. template <class T, class Policy>
  18. typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol);
  19. template <class T>
  20. typename tools::promote_args<T>::type trunc(const T& v);
  21. template <class T, class Policy>
  22. int itrunc(const T& v, const Policy& pol);
  23. template <class T>
  24. int itrunc(const T& v);
  25. template <class T, class Policy>
  26. long ltrunc(const T& v, const Policy& pol);
  27. template <class T>
  28. long ltrunc(const T& v);
  29. template <class T, class Policy>
  30. long long lltrunc(const T& v, const Policy& pol);
  31. template <class T>
  32. long long lltrunc(const T& v);
  33. template <class T, class Policy>
  34. typename tools::promote_args<T>::type round(const T& v, const Policy& pol);
  35. template <class T>
  36. typename tools::promote_args<T>::type round(const T& v);
  37. template <class T, class Policy>
  38. int iround(const T& v, const Policy& pol);
  39. template <class T>
  40. int iround(const T& v);
  41. template <class T, class Policy>
  42. long lround(const T& v, const Policy& pol);
  43. template <class T>
  44. long lround(const T& v);
  45. template <class T, class Policy>
  46. long long llround(const T& v, const Policy& pol);
  47. template <class T>
  48. long long llround(const T& v);
  49. template <class T, class Policy>
  50. T modf(const T& v, T* ipart, const Policy& pol);
  51. template <class T>
  52. T modf(const T& v, T* ipart);
  53. template <class T, class Policy>
  54. T modf(const T& v, int* ipart, const Policy& pol);
  55. template <class T>
  56. T modf(const T& v, int* ipart);
  57. template <class T, class Policy>
  58. T modf(const T& v, long* ipart, const Policy& pol);
  59. template <class T>
  60. T modf(const T& v, long* ipart);
  61. template <class T, class Policy>
  62. T modf(const T& v, long long* ipart, const Policy& pol);
  63. template <class T>
  64. T modf(const T& v, long long* ipart);
  65. }
  66. }
  67. #undef BOOST_MATH_STD_USING
  68. #define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\
  69. using boost::math::round;\
  70. using boost::math::iround;\
  71. using boost::math::lround;\
  72. using boost::math::trunc;\
  73. using boost::math::itrunc;\
  74. using boost::math::ltrunc;\
  75. using boost::math::modf;
  76. #endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP