Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 1 | // Copyright John Maddock 2008. |
| 2 | |
| 3 | // Use, modification and distribution are subject to the |
| 4 | // Boost Software License, Version 1.0. |
| 5 | // (See accompanying file LICENSE_1_0.txt |
| 6 | // or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 8 | #ifndef NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP |
| 9 | #define NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 10 | |
| 11 | #include <ndnboost/config.hpp> |
| 12 | #include <ndnboost/math/tools/promotion.hpp> |
| 13 | |
| 14 | #ifdef _MSC_VER |
| 15 | #pragma once |
| 16 | #endif |
| 17 | |
| 18 | namespace ndnboost |
| 19 | { |
| 20 | namespace math |
| 21 | { |
| 22 | |
| 23 | template <class T, class Policy> |
| 24 | typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol); |
| 25 | template <class T> |
| 26 | typename tools::promote_args<T>::type trunc(const T& v); |
| 27 | template <class T, class Policy> |
| 28 | int itrunc(const T& v, const Policy& pol); |
| 29 | template <class T> |
| 30 | int itrunc(const T& v); |
| 31 | template <class T, class Policy> |
| 32 | long ltrunc(const T& v, const Policy& pol); |
| 33 | template <class T> |
| 34 | long ltrunc(const T& v); |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 35 | #ifdef NDNBOOST_HAS_LONG_LONG |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 36 | template <class T, class Policy> |
| 37 | ndnboost::long_long_type lltrunc(const T& v, const Policy& pol); |
| 38 | template <class T> |
| 39 | ndnboost::long_long_type lltrunc(const T& v); |
| 40 | #endif |
| 41 | template <class T, class Policy> |
| 42 | typename tools::promote_args<T>::type round(const T& v, const Policy& pol); |
| 43 | template <class T> |
| 44 | typename tools::promote_args<T>::type round(const T& v); |
| 45 | template <class T, class Policy> |
| 46 | int iround(const T& v, const Policy& pol); |
| 47 | template <class T> |
| 48 | int iround(const T& v); |
| 49 | template <class T, class Policy> |
| 50 | long lround(const T& v, const Policy& pol); |
| 51 | template <class T> |
| 52 | long lround(const T& v); |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 53 | #ifdef NDNBOOST_HAS_LONG_LONG |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 54 | template <class T, class Policy> |
| 55 | ndnboost::long_long_type llround(const T& v, const Policy& pol); |
| 56 | template <class T> |
| 57 | ndnboost::long_long_type llround(const T& v); |
| 58 | #endif |
| 59 | template <class T, class Policy> |
| 60 | T modf(const T& v, T* ipart, const Policy& pol); |
| 61 | template <class T> |
| 62 | T modf(const T& v, T* ipart); |
| 63 | template <class T, class Policy> |
| 64 | T modf(const T& v, int* ipart, const Policy& pol); |
| 65 | template <class T> |
| 66 | T modf(const T& v, int* ipart); |
| 67 | template <class T, class Policy> |
| 68 | T modf(const T& v, long* ipart, const Policy& pol); |
| 69 | template <class T> |
| 70 | T modf(const T& v, long* ipart); |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 71 | #ifdef NDNBOOST_HAS_LONG_LONG |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 72 | template <class T, class Policy> |
| 73 | T modf(const T& v, ndnboost::long_long_type* ipart, const Policy& pol); |
| 74 | template <class T> |
| 75 | T modf(const T& v, ndnboost::long_long_type* ipart); |
| 76 | #endif |
| 77 | |
| 78 | } |
| 79 | } |
| 80 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 81 | #undef NDNBOOST_MATH_STD_USING |
| 82 | #define NDNBOOST_MATH_STD_USING NDNBOOST_MATH_STD_USING_CORE\ |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 83 | using ndnboost::math::round;\ |
| 84 | using ndnboost::math::iround;\ |
| 85 | using ndnboost::math::lround;\ |
| 86 | using ndnboost::math::trunc;\ |
| 87 | using ndnboost::math::itrunc;\ |
| 88 | using ndnboost::math::ltrunc;\ |
| 89 | using ndnboost::math::modf; |
| 90 | |
| 91 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 92 | #endif // NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 93 | |