blob: 80518c7c012f146c10eed8ac8fd214332f447559 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// 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 Thompson3d613fd2013-10-15 15:39:04 -07008#ifndef NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
9#define NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070010
11#include <ndnboost/config.hpp>
12#include <ndnboost/math/tools/promotion.hpp>
13
14#ifdef _MSC_VER
15#pragma once
16#endif
17
18namespace 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 Thompson3d613fd2013-10-15 15:39:04 -070035#ifdef NDNBOOST_HAS_LONG_LONG
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070036 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 Thompson3d613fd2013-10-15 15:39:04 -070053#ifdef NDNBOOST_HAS_LONG_LONG
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070054 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 Thompson3d613fd2013-10-15 15:39:04 -070071#ifdef NDNBOOST_HAS_LONG_LONG
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070072 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 Thompson3d613fd2013-10-15 15:39:04 -070081#undef NDNBOOST_MATH_STD_USING
82#define NDNBOOST_MATH_STD_USING NDNBOOST_MATH_STD_USING_CORE\
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070083 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 Thompson3d613fd2013-10-15 15:39:04 -070092#endif // NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070093