ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/math/policies/policy.hpp b/include/ndnboost/math/policies/policy.hpp
index 1a4bb16..66a35d9 100644
--- a/include/ndnboost/math/policies/policy.hpp
+++ b/include/ndnboost/math/policies/policy.hpp
@@ -3,8 +3,8 @@
 //  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_POLICY_HPP
-#define BOOST_MATH_POLICY_HPP
+#ifndef NDNBOOST_MATH_POLICY_HPP
+#define NDNBOOST_MATH_POLICY_HPP
 
 #include <ndnboost/mpl/list.hpp>
 #include <ndnboost/mpl/contains.hpp>
@@ -33,9 +33,9 @@
 namespace tools{
 
 template <class T>
-int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+int digits(NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
 template <class T>
-T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+T epsilon(NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
 
 }
 
@@ -44,59 +44,59 @@
 //
 // Define macros for our default policies, if they're not defined already:
 //
-#ifndef BOOST_MATH_DOMAIN_ERROR_POLICY
-#define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+#ifndef NDNBOOST_MATH_DOMAIN_ERROR_POLICY
+#define NDNBOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
 #endif
-#ifndef BOOST_MATH_POLE_ERROR_POLICY
-#define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+#ifndef NDNBOOST_MATH_POLE_ERROR_POLICY
+#define NDNBOOST_MATH_POLE_ERROR_POLICY throw_on_error
 #endif
-#ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+#ifndef NDNBOOST_MATH_OVERFLOW_ERROR_POLICY
+#define NDNBOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
 #endif
-#ifndef BOOST_MATH_EVALUATION_ERROR_POLICY
-#define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+#ifndef NDNBOOST_MATH_EVALUATION_ERROR_POLICY
+#define NDNBOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
 #endif
-#ifndef BOOST_MATH_ROUNDING_ERROR_POLICY
-#define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error
+#ifndef NDNBOOST_MATH_ROUNDING_ERROR_POLICY
+#define NDNBOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error
 #endif
-#ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY
-#define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+#ifndef NDNBOOST_MATH_UNDERFLOW_ERROR_POLICY
+#define NDNBOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
 #endif
-#ifndef BOOST_MATH_DENORM_ERROR_POLICY
-#define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+#ifndef NDNBOOST_MATH_DENORM_ERROR_POLICY
+#define NDNBOOST_MATH_DENORM_ERROR_POLICY ignore_error
 #endif
-#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
-#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error
+#ifndef NDNBOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
+#define NDNBOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error
 #endif
-#ifndef BOOST_MATH_DIGITS10_POLICY
-#define BOOST_MATH_DIGITS10_POLICY 0
+#ifndef NDNBOOST_MATH_DIGITS10_POLICY
+#define NDNBOOST_MATH_DIGITS10_POLICY 0
 #endif
-#ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY
-#define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+#ifndef NDNBOOST_MATH_PROMOTE_FLOAT_POLICY
+#define NDNBOOST_MATH_PROMOTE_FLOAT_POLICY true
 #endif
-#ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false
+#ifndef NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#define NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY false
 #else
-#define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+#define NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY true
 #endif
 #endif
-#ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY
-#define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+#ifndef NDNBOOST_MATH_DISCRETE_QUANTILE_POLICY
+#define NDNBOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
 #endif
-#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY
-#define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+#ifndef NDNBOOST_MATH_ASSERT_UNDEFINED_POLICY
+#define NDNBOOST_MATH_ASSERT_UNDEFINED_POLICY true
 #endif
-#ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY
-#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+#ifndef NDNBOOST_MATH_MAX_SERIES_ITERATION_POLICY
+#define NDNBOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
 #endif
-#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY
-#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+#ifndef NDNBOOST_MATH_MAX_ROOT_ITERATION_POLICY
+#define NDNBOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
 #endif
 
 #if !defined(__BORLANDC__) \
    && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
-#define BOOST_MATH_META_INT(type, name, Default)\
+#define NDNBOOST_MATH_META_INT(type, name, Default)\
    template <type N = Default> struct name : public ndnboost::mpl::int_<N>{};\
    namespace detail{\
    template <type N>\
@@ -106,12 +106,12 @@
    {\
       template <type N> static char test(const name<N>*);\
       static double test(...);\
-      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+      NDNBOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
    };\
    }\
    template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>{};
 
-#define BOOST_MATH_META_BOOL(name, Default)\
+#define NDNBOOST_MATH_META_BOOL(name, Default)\
    template <bool N = Default> struct name : public ndnboost::mpl::bool_<N>{};\
    namespace detail{\
    template <bool N>\
@@ -121,12 +121,12 @@
    {\
       template <bool N> static char test(const name<N>*);\
       static double test(...);\
-      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+      NDNBOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
    };\
    }\
    template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>{};
 #else
-#define BOOST_MATH_META_INT(Type, name, Default)\
+#define NDNBOOST_MATH_META_INT(Type, name, Default)\
    template <Type N = Default> struct name : public ndnboost::mpl::int_<N>{};\
    namespace detail{\
    template <Type N>\
@@ -140,7 +140,7 @@
    template <class T> struct is_##name##_imp\
    {\
       static T inst;\
-      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+      NDNBOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
    };\
    }\
    template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>\
@@ -148,7 +148,7 @@
       template <class U> struct apply{ typedef is_##name<U> type; };\
    };
 
-#define BOOST_MATH_META_BOOL(name, Default)\
+#define NDNBOOST_MATH_META_BOOL(name, Default)\
    template <bool N = Default> struct name : public ndnboost::mpl::bool_<N>{};\
    namespace detail{\
    template <bool N>\
@@ -162,7 +162,7 @@
    template <class T> struct is_##name##_imp\
    {\
       static T inst;\
-      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+      NDNBOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
    };\
    }\
    template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>\
@@ -181,21 +181,21 @@
    user_error = 3
 };
 
-BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY)
-BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, domain_error, NDNBOOST_MATH_DOMAIN_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, pole_error, NDNBOOST_MATH_POLE_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, overflow_error, NDNBOOST_MATH_OVERFLOW_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, underflow_error, NDNBOOST_MATH_UNDERFLOW_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, denorm_error, NDNBOOST_MATH_DENORM_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, evaluation_error, NDNBOOST_MATH_EVALUATION_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, rounding_error, NDNBOOST_MATH_ROUNDING_ERROR_POLICY)
+NDNBOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, NDNBOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY)
 
 //
 // Policy types for internal promotion:
 //
-BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY)
-BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY)
-BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY)
+NDNBOOST_MATH_META_BOOL(promote_float, NDNBOOST_MATH_PROMOTE_FLOAT_POLICY)
+NDNBOOST_MATH_META_BOOL(promote_double, NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY)
+NDNBOOST_MATH_META_BOOL(assert_undefined, NDNBOOST_MATH_ASSERT_UNDEFINED_POLICY)
 //
 // Policy types for discrete quantiles:
 //
@@ -209,23 +209,23 @@
    integer_round_nearest
 };
 
-BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY)
+NDNBOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, NDNBOOST_MATH_DISCRETE_QUANTILE_POLICY)
 //
 // Precision:
 //
-BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY)
-BOOST_MATH_META_INT(int, digits2, 0)
+NDNBOOST_MATH_META_INT(int, digits10, NDNBOOST_MATH_DIGITS10_POLICY)
+NDNBOOST_MATH_META_INT(int, digits2, 0)
 //
 // Iterations:
 //
-BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY)
-BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY)
+NDNBOOST_MATH_META_INT(unsigned long, max_series_iterations, NDNBOOST_MATH_MAX_SERIES_ITERATION_POLICY)
+NDNBOOST_MATH_META_INT(unsigned long, max_root_iterations, NDNBOOST_MATH_MAX_ROOT_ITERATION_POLICY)
 //
 // Define the names for each possible policy:
 //
-#define BOOST_MATH_PARAMETER(name)\
-   BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\
-   BOOST_PARAMETER_NAME(name##_name)
+#define NDNBOOST_MATH_PARAMETER(name)\
+   NDNBOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\
+   NDNBOOST_PARAMETER_NAME(name##_name)
 
 struct default_policy{};
 
@@ -287,13 +287,13 @@
 template <class T>
 struct is_valid_policy_imp 
 {
-   BOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
+   NDNBOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
 };
 
 template <class T>
 struct is_default_policy_imp
 {
-   BOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
+   NDNBOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
 };
 
 template <class T> struct is_valid_policy 
@@ -357,8 +357,8 @@
    typedef default_policy arg2;
 };
 
-typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg1 forwarding_arg1;
-typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg2 forwarding_arg2;
+typedef default_args<NDNBOOST_MATH_PROMOTE_FLOAT_POLICY, NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg1 forwarding_arg1;
+typedef default_args<NDNBOOST_MATH_PROMOTE_FLOAT_POLICY, NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg2 forwarding_arg2;
 
 } // detail
 //
@@ -384,19 +384,19 @@
    //
    // Validate all our arguments:
    //
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A1>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A2>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A3>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A4>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A5>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A6>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A7>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A8>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A9>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A10>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A11>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A12>::value);
-   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A13>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A1>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A2>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A3>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A4>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A5>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A6>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A7>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A8>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A9>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A10>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A11>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A12>::value);
+   NDNBOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A13>::value);
    //
    // Typelist of the arguments:
    //
@@ -455,7 +455,7 @@
    typedef evaluation_error<> evaluation_error_type;
    typedef rounding_error<> rounding_error_type;
    typedef indeterminate_result_error<> indeterminate_result_error_type;
-#if BOOST_MATH_DIGITS10_POLICY == 0
+#if NDNBOOST_MATH_DIGITS10_POLICY == 0
    typedef digits2<> precision_type;
 #else
    typedef detail::precision<digits10<>, digits2<> >::type precision_type;
@@ -480,7 +480,7 @@
    typedef evaluation_error<> evaluation_error_type;
    typedef rounding_error<> rounding_error_type;
    typedef indeterminate_result_error<> indeterminate_result_error_type;
-#if BOOST_MATH_DIGITS10_POLICY == 0
+#if NDNBOOST_MATH_DIGITS10_POLICY == 0
    typedef digits2<> precision_type;
 #else
    typedef detail::precision<digits10<>, digits2<> >::type precision_type;
@@ -724,7 +724,7 @@
    typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type;
 };
 
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
 
 template <class Real>
 struct basic_digits : public mpl::int_<0>{ };
@@ -738,7 +738,7 @@
 template <class Real, class Policy>
 struct precision
 {
-   BOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
+   NDNBOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
    typedef typename Policy::precision_type precision_type;
    typedef basic_digits<Real> digits_t;
    typedef typename mpl::if_<
@@ -776,7 +776,7 @@
 template <class Real, class Policy>
 struct precision
 {
-   BOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
+   NDNBOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
 #ifndef __BORLANDC__
    typedef typename Policy::precision_type precision_type;
    typedef typename mpl::if_c<
@@ -813,7 +813,7 @@
 
 #endif
 
-#ifdef BOOST_MATH_USE_FLOAT128
+#ifdef NDNBOOST_MATH_USE_FLOAT128
 
 template <class Policy>
 struct precision<__float128, Policy>
@@ -828,10 +828,10 @@
 template <class T, class Policy>
 inline int digits_imp(mpl::true_ const&)
 {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#ifndef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   NDNBOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
 #else
-   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+   NDNBOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
 #endif
    typedef typename ndnboost::math::policies::precision<T, Policy>::type p_t;
    return p_t::value;
@@ -846,7 +846,7 @@
 } // namespace detail
 
 template <class T, class Policy>
-inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+inline int digits(NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
 {
    typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
    return detail::digits_imp<T, Policy>(tag_type());
@@ -906,12 +906,12 @@
 template <class T, class Policy>
 inline T get_epsilon_imp(mpl::true_ const&)
 {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
-   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
+#ifndef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   NDNBOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+   NDNBOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
 #else
-   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
-   BOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
+   NDNBOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+   NDNBOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
 #endif
    typedef typename ndnboost::math::policies::precision<T, Policy>::type p_t;
    typedef mpl::bool_<p_t::value <= std::numeric_limits<ndnboost::uintmax_t>::digits> is_small_int;
@@ -928,7 +928,7 @@
 } // namespace detail
 
 template <class T, class Policy>
-inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+inline T get_epsilon(NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
 {
    typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
    return detail::get_epsilon_imp<T, Policy>(tag_type());
@@ -953,7 +953,7 @@
 template <class P>
 struct is_policy_imp
 {
-   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::ndnboost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
+   NDNBOOST_STATIC_CONSTANT(bool, value = (sizeof(::ndnboost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
 };
 
 }
@@ -986,7 +986,7 @@
 
 }}} // namespaces
 
-#endif // BOOST_MATH_POLICY_HPP
+#endif // NDNBOOST_MATH_POLICY_HPP
 
 
 
diff --git a/include/ndnboost/math/special_functions/detail/fp_traits.hpp b/include/ndnboost/math/special_functions/detail/fp_traits.hpp
index e1c8d78..eff178a 100644
--- a/include/ndnboost/math/special_functions/detail/fp_traits.hpp
+++ b/include/ndnboost/math/special_functions/detail/fp_traits.hpp
@@ -1,7 +1,7 @@
 // fp_traits.hpp
 
-#ifndef BOOST_MATH_FP_TRAITS_HPP
-#define BOOST_MATH_FP_TRAITS_HPP
+#ifndef NDNBOOST_MATH_FP_TRAITS_HPP
+#define NDNBOOST_MATH_FP_TRAITS_HPP
 
 // Copyright (c) 2006 Johan Rade
 
@@ -17,7 +17,7 @@
 
 #if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
 // The VAX floating point formats are used (for float and double)
-#   define BOOST_FPCLASSIFY_VAX_FORMAT
+#   define NDNBOOST_FPCLASSIFY_VAX_FORMAT
 #endif
 
 #include <cstring>
@@ -28,7 +28,7 @@
 #include <ndnboost/static_assert.hpp>
 #include <ndnboost/type_traits/is_floating_point.hpp>
 
-#ifdef BOOST_NO_STDC_NAMESPACE
+#ifdef NDNBOOST_NO_STDC_NAMESPACE
   namespace std{ using ::memcpy; }
 #endif
 
@@ -42,7 +42,7 @@
 
 #else
 
-#define BOOST_HAS_FPCLASSIFY
+#define NDNBOOST_HAS_FPCLASSIFY
 
 #ifndef fpclassify
 #  if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
@@ -51,26 +51,26 @@
          && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
 #     ifdef _STLP_VENDOR_CSTD
 #        if _STLPORT_VERSION >= 0x520
-#           define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: 
+#           define NDNBOOST_FPCLASSIFY_PREFIX ::__std_alias:: 
 #        else
-#           define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: 
+#           define NDNBOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: 
 #        endif
 #     else
-#        define BOOST_FPCLASSIFY_PREFIX ::std::
+#        define NDNBOOST_FPCLASSIFY_PREFIX ::std::
 #     endif
 #  else
-#     undef BOOST_HAS_FPCLASSIFY
-#     define BOOST_FPCLASSIFY_PREFIX
+#     undef NDNBOOST_HAS_FPCLASSIFY
+#     define NDNBOOST_FPCLASSIFY_PREFIX
 #  endif
 #elif (defined(__HP_aCC) && !defined(__hppa))
 // aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
-#  define BOOST_FPCLASSIFY_PREFIX ::
+#  define NDNBOOST_FPCLASSIFY_PREFIX ::
 #else
-#  define BOOST_FPCLASSIFY_PREFIX
+#  define NDNBOOST_FPCLASSIFY_PREFIX
 #endif
 
 #ifdef __MINGW32__
-#  undef BOOST_HAS_FPCLASSIFY
+#  undef NDNBOOST_HAS_FPCLASSIFY
 #endif
 
 #endif
@@ -96,7 +96,7 @@
 struct ieee_copy_all_bits_tag : public ieee_tag {};
 struct ieee_copy_leading_bits_tag : public ieee_tag {};
 
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
 //
 // These helper functions are used only when numeric_limits<>
 // members are not compile time constants:
@@ -138,7 +138,7 @@
 
 template<class T, class U> struct fp_traits_non_native
 {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifndef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
    typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
 #else
    typedef generic_tag<false> method;
@@ -172,16 +172,16 @@
 
 // ieee_tag version, float (32 bits) -----------------------------------------------
 
-#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+#ifndef NDNBOOST_FPCLASSIFY_VAX_FORMAT
 
 template<> struct fp_traits_non_native<float, single_precision>
 {
     typedef ieee_copy_all_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7f800000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7f800000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
 
     typedef uint32_t bits;
     static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
@@ -190,17 +190,17 @@
 
 // ieee_tag version, double (64 bits) ----------------------------------------------
 
-#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
+#if defined(NDNBOOST_NO_INT64_T) || defined(NDNBOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
    || defined(__BORLANDC__) || defined(__CODEGEAR__)
 
 template<> struct fp_traits_non_native<double, double_precision>
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
 
     typedef uint32_t bits;
 
@@ -216,12 +216,12 @@
 
 private:
 
-#if defined(BOOST_BIG_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#if defined(NDNBOOST_BIG_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(NDNBOOST_LITTLE_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 4);
 #else
-    BOOST_STATIC_ASSERT(false);
+    NDNBOOST_STATIC_ASSERT(false);
 #endif
 };
 
@@ -246,21 +246,21 @@
 
 #endif
 
-#endif  // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+#endif  // #ifndef NDNBOOST_FPCLASSIFY_VAX_FORMAT
 
 // long double (64 bits) -------------------------------------------------------
 
-#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
+#if defined(NDNBOOST_NO_INT64_T) || defined(NDNBOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
    || defined(__BORLANDC__) || defined(__CODEGEAR__)
 
 template<> struct fp_traits_non_native<long double, double_precision>
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
 
     typedef uint32_t bits;
 
@@ -276,12 +276,12 @@
 
 private:
 
-#if defined(BOOST_BIG_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#if defined(NDNBOOST_BIG_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(NDNBOOST_LITTLE_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 4);
 #else
-    BOOST_STATIC_ASSERT(false);
+    NDNBOOST_STATIC_ASSERT(false);
 #endif
 };
 
@@ -320,10 +320,10 @@
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
 
     typedef uint32_t bits;
 
@@ -364,10 +364,10 @@
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
 
     typedef uint32_t bits;
 
@@ -383,12 +383,12 @@
 
 private:
 
-#if defined(BOOST_BIG_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#if defined(NDNBOOST_BIG_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(NDNBOOST_LITTLE_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 12);
 #else
-    BOOST_STATIC_ASSERT(false);
+    NDNBOOST_STATIC_ASSERT(false);
 #endif
 };
 
@@ -409,10 +409,10 @@
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
 
     // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
 
@@ -445,10 +445,10 @@
 {
     typedef ieee_copy_leading_bits_tag method;
 
-    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
-    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
-    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
-    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    NDNBOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
 
     typedef uint32_t bits;
 
@@ -464,12 +464,12 @@
 
 private:
 
-#if defined(BOOST_BIG_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
-    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#if defined(NDNBOOST_BIG_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(NDNBOOST_LITTLE_ENDIAN)
+    NDNBOOST_STATIC_CONSTANT(int, offset_ = 12);
 #else
-    BOOST_STATIC_ASSERT(false);
+    NDNBOOST_STATIC_ASSERT(false);
 #endif
 };
 
@@ -518,7 +518,7 @@
 template <class T>
 struct select_native
 {
-    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
+    typedef NDNBOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
     typedef fp_traits_non_native<T, precision> type;
 };
 template<>
@@ -541,19 +541,19 @@
 
 // fp_traits is a type switch that selects the right fp_traits_non_native
 
-#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
+#if (defined(NDNBOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
    && !defined(__hpux) \
    && !defined(__DECCXX)\
    && !defined(__osf__) \
    && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
-   && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
-#  define BOOST_MATH_USE_STD_FPCLASSIFY
+   && !defined(NDNBOOST_MATH_DISABLE_STD_FPCLASSIFY)
+#  define NDNBOOST_MATH_USE_STD_FPCLASSIFY
 #endif
 
 template<class T> struct fp_traits
 {
-    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+    typedef NDNBOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
+#if defined(NDNBOOST_MATH_USE_STD_FPCLASSIFY) && !defined(NDNBOOST_MATH_DISABLE_STD_FPCLASSIFY)
     typedef typename select_native<T>::type type;
 #else
     typedef fp_traits_non_native<T, precision> type;
diff --git a/include/ndnboost/math/special_functions/detail/round_fwd.hpp b/include/ndnboost/math/special_functions/detail/round_fwd.hpp
index 62d9390..80518c7 100644
--- a/include/ndnboost/math/special_functions/detail/round_fwd.hpp
+++ b/include/ndnboost/math/special_functions/detail/round_fwd.hpp
@@ -5,8 +5,8 @@
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
-#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#ifndef NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#define NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
 
 #include <ndnboost/config.hpp>
 #include <ndnboost/math/tools/promotion.hpp>
@@ -32,7 +32,7 @@
    long ltrunc(const T& v, const Policy& pol);
    template <class T>
    long ltrunc(const T& v);
-#ifdef BOOST_HAS_LONG_LONG
+#ifdef NDNBOOST_HAS_LONG_LONG
    template <class T, class Policy>
    ndnboost::long_long_type lltrunc(const T& v, const Policy& pol);
    template <class T>
@@ -50,7 +50,7 @@
    long lround(const T& v, const Policy& pol);
    template <class T>
    long lround(const T& v);
-#ifdef BOOST_HAS_LONG_LONG
+#ifdef NDNBOOST_HAS_LONG_LONG
    template <class T, class Policy>
    ndnboost::long_long_type llround(const T& v, const Policy& pol);
    template <class T>
@@ -68,7 +68,7 @@
    T modf(const T& v, long* ipart, const Policy& pol);
    template <class T>
    T modf(const T& v, long* ipart);
-#ifdef BOOST_HAS_LONG_LONG
+#ifdef NDNBOOST_HAS_LONG_LONG
    template <class T, class Policy>
    T modf(const T& v, ndnboost::long_long_type* ipart, const Policy& pol);
    template <class T>
@@ -78,8 +78,8 @@
    }
 }
 
-#undef BOOST_MATH_STD_USING
-#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\
+#undef NDNBOOST_MATH_STD_USING
+#define NDNBOOST_MATH_STD_USING NDNBOOST_MATH_STD_USING_CORE\
    using ndnboost::math::round;\
    using ndnboost::math::iround;\
    using ndnboost::math::lround;\
@@ -89,5 +89,5 @@
    using ndnboost::math::modf;
 
 
-#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#endif // NDNBOOST_MATH_SPECIAL_ROUND_FWD_HPP
 
diff --git a/include/ndnboost/math/special_functions/fpclassify.hpp b/include/ndnboost/math/special_functions/fpclassify.hpp
index 0eeea57..7b4b193 100644
--- a/include/ndnboost/math/special_functions/fpclassify.hpp
+++ b/include/ndnboost/math/special_functions/fpclassify.hpp
@@ -4,8 +4,8 @@
 //  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_FPCLASSIFY_HPP
-#define BOOST_MATH_FPCLASSIFY_HPP
+#ifndef NDNBOOST_MATH_FPCLASSIFY_HPP
+#define NDNBOOST_MATH_FPCLASSIFY_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -81,7 +81,7 @@
 #include <float.h>
 #endif
 
-#ifdef BOOST_NO_STDC_NAMESPACE
+#ifdef NDNBOOST_NO_STDC_NAMESPACE
   namespace std{ using ::abs; using ::fabs; }
 #endif
 
@@ -94,7 +94,7 @@
 //
 namespace math_detail{
 
-#ifdef BOOST_MSVC
+#ifdef NDNBOOST_MSVC
 #pragma warning(push)
 #pragma warning(disable:4800)
 #endif
@@ -104,15 +104,15 @@
 {
 #ifdef isnan
    return isnan(t);
-#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY)
+#elif defined(NDNBOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(NDNBOOST_HAS_FPCLASSIFY)
    (void)t;
    return false;
-#else // BOOST_HAS_FPCLASSIFY
-   return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
+#else // NDNBOOST_HAS_FPCLASSIFY
+   return (NDNBOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
 #endif
 }
 
-#ifdef BOOST_MSVC
+#ifdef NDNBOOST_MSVC
 #pragma warning(pop)
 #endif
 
@@ -128,21 +128,21 @@
 
 namespace detail{
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
 template <class T>
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&)
+inline int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(T t, const native_tag&)
 {
    return (std::fpclassify)(t);
 }
 #endif
 
 template <class T>
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
+inline int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
 {
-   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(t);
 
    // whenever possible check for Nan's first:
-#if defined(BOOST_HAS_FPCLASSIFY)  && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+#if defined(NDNBOOST_HAS_FPCLASSIFY)  && !defined(NDNBOOST_MATH_DISABLE_STD_FPCLASSIFY)
    if(::ndnboost::math_detail::is_nan_helper(t, ::ndnboost::is_floating_point<T>()))
       return FP_NAN;
 #elif defined(isnan)
@@ -173,9 +173,9 @@
 }
 
 template <class T>
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
+inline int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
 {
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
    if(std::numeric_limits<T>::is_specialized)
       return fpclassify_imp(t, generic_tag<true>());
 #endif
@@ -183,24 +183,24 @@
    // An unknown type with no numeric_limits support,
    // so what are we supposed to do we do here?
    //
-   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(t);
 
    return t == 0 ? FP_ZERO : FP_NORMAL;
 }
 
 template<class T>
-int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
+int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
 {
-   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+   typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(x);
 
-   BOOST_DEDUCED_TYPENAME traits::bits a;
+   NDNBOOST_DEDUCED_TYPENAME traits::bits a;
    traits::get_bits(x,a);
-   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(a);
    a &= traits::exponent | traits::flag | traits::significand;
-   BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
-   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(a);
 
    if(a <= traits::significand) {
       if(a == 0)
@@ -218,13 +218,13 @@
 }
 
 template<class T>
-int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
+int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
 {
-   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+   typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+   NDNBOOST_MATH_INSTRUMENT_VARIABLE(x);
 
-   BOOST_DEDUCED_TYPENAME traits::bits a;
+   NDNBOOST_DEDUCED_TYPENAME traits::bits a;
    traits::get_bits(x,a);
    a &= traits::exponent | traits::flag | traits::significand;
 
@@ -244,8 +244,8 @@
    return FP_NAN;
 }
 
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS))
-inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(NDNBOOST_MATH_USE_STD_FPCLASSIFY) && (defined(NDNBOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS))
+inline int fpclassify_imp NDNBOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
    return ndnboost::math::detail::fpclassify_imp(t, generic_tag<true>());
 }
@@ -254,12 +254,12 @@
 }  // namespace detail
 
 template <class T>
-inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
+inline int fpclassify NDNBOOST_NO_MACRO_EXPAND(T t)
 {
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
    typedef typename tools::promote_args<T>::type value_type;
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
    if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
       return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
    return detail::fpclassify_imp(static_cast<value_type>(t), method());
@@ -268,14 +268,14 @@
 #endif
 }
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 template <>
-inline int fpclassify<long double> BOOST_NO_MACRO_EXPAND(long double t)
+inline int fpclassify<long double> NDNBOOST_NO_MACRO_EXPAND(long double t)
 {
    typedef detail::fp_traits<long double>::type traits;
    typedef traits::method method;
    typedef long double value_type;
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
    if(std::numeric_limits<long double>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
       return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
    return detail::fpclassify_imp(static_cast<value_type>(t), method());
@@ -287,7 +287,7 @@
 
 namespace detail {
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
     template<class T>
     inline bool isfinite_impl(T x, native_tag const&)
     {
@@ -305,7 +305,7 @@
     template<class T>
     inline bool isfinite_impl(T x, generic_tag<false> const&)
     {
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
       if(std::numeric_limits<T>::is_specialized)
          return isfinite_impl(x, generic_tag<true>());
 #endif
@@ -316,15 +316,15 @@
     template<class T>
     inline bool isfinite_impl(T x, ieee_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        typedef NDNBOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a &= traits::exponent;
         return a != traits::exponent;
     }
 
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(NDNBOOST_MATH_USE_STD_FPCLASSIFY) && defined(NDNBOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isfinite_impl NDNBOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
    return ndnboost::math::detail::isfinite_impl(t, generic_tag<true>());
 }
@@ -342,7 +342,7 @@
    return detail::isfinite_impl(static_cast<value_type>(x), method());
 }
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 template<>
 inline bool (isfinite)(long double x)
 { //!< \brief return true if floating-point type t is finite.
@@ -358,7 +358,7 @@
 
 namespace detail {
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
     template<class T>
     inline bool isnormal_impl(T x, native_tag const&)
     {
@@ -377,7 +377,7 @@
     template<class T>
     inline bool isnormal_impl(T x, generic_tag<false> const&)
     {
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
       if(std::numeric_limits<T>::is_specialized)
          return isnormal_impl(x, generic_tag<true>());
 #endif
@@ -387,15 +387,15 @@
     template<class T>
     inline bool isnormal_impl(T x, ieee_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        typedef NDNBOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a &= traits::exponent | traits::flag;
         return (a != 0) && (a < traits::exponent);
     }
 
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(NDNBOOST_MATH_USE_STD_FPCLASSIFY) && defined(NDNBOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isnormal_impl NDNBOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
    return ndnboost::math::detail::isnormal_impl(t, generic_tag<true>());
 }
@@ -413,7 +413,7 @@
    return detail::isnormal_impl(static_cast<value_type>(x), method());
 }
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 template<>
 inline bool (isnormal)(long double x)
 {
@@ -429,7 +429,7 @@
 
 namespace detail {
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
     template<class T>
     inline bool isinf_impl(T x, native_tag const&)
     {
@@ -449,7 +449,7 @@
     template<class T>
     inline bool isinf_impl(T x, generic_tag<false> const&)
     {
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
       if(std::numeric_limits<T>::is_specialized)
          return isinf_impl(x, generic_tag<true>());
 #endif
@@ -460,9 +460,9 @@
     template<class T>
     inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a &= traits::exponent | traits::significand;
         return a == traits::exponent;
@@ -471,9 +471,9 @@
     template<class T>
     inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a &= traits::exponent | traits::significand;
         if(a != traits::exponent)
@@ -483,8 +483,8 @@
         return x == 0;
     }
 
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(NDNBOOST_MATH_USE_STD_FPCLASSIFY) && defined(NDNBOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isinf_impl NDNBOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
 {
    return ndnboost::math::detail::isinf_impl(t, generic_tag<true>());
 }
@@ -502,7 +502,7 @@
    return detail::isinf_impl(static_cast<value_type>(x), method());
 }
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 template<>
 inline bool (isinf)(long double x)
 {
@@ -518,7 +518,7 @@
 
 namespace detail {
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
     template<class T>
     inline bool isnan_impl(T x, native_tag const&)
     {
@@ -537,7 +537,7 @@
     template<class T>
     inline bool isnan_impl(T x, generic_tag<false> const&)
     {
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#ifdef NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
       if(std::numeric_limits<T>::is_specialized)
          return isnan_impl(x, generic_tag<true>());
 #endif
@@ -548,9 +548,9 @@
     template<class T>
     inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a &= traits::exponent | traits::significand;
         return a > traits::exponent;
@@ -559,9 +559,9 @@
     template<class T>
     inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
 
         a &= traits::exponent | traits::significand;
@@ -585,10 +585,10 @@
 }
 
 #ifdef isnan
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
-template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
-#elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+template <> inline bool isnan NDNBOOST_NO_MACRO_EXPAND<float>(float t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+template <> inline bool isnan NDNBOOST_NO_MACRO_EXPAND<double>(double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+template <> inline bool isnan NDNBOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+#elif defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
 template<>
 inline bool (isnan)(long double x)
 { //!< \brief return true if floating-point type t is NaN (Not A Number).
@@ -602,5 +602,5 @@
 } // namespace math
 } // namespace ndnboost
 
-#endif // BOOST_MATH_FPCLASSIFY_HPP
+#endif // NDNBOOST_MATH_FPCLASSIFY_HPP
 
diff --git a/include/ndnboost/math/special_functions/math_fwd.hpp b/include/ndnboost/math/special_functions/math_fwd.hpp
index aeb7b4c..d4e1867 100644
--- a/include/ndnboost/math/special_functions/math_fwd.hpp
+++ b/include/ndnboost/math/special_functions/math_fwd.hpp
@@ -16,8 +16,8 @@
 // RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
 // AT = Integer or Real type
 
-#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
-#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#ifndef NDNBOOST_MATH_SPECIAL_MATH_FWD_HPP
+#define NDNBOOST_MATH_SPECIAL_MATH_FWD_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -29,7 +29,7 @@
 #include <ndnboost/mpl/comparison.hpp>
 #include <ndnboost/config/no_tr1/complex.hpp>
 
-#define BOOST_NO_MACRO_EXPAND /**/
+#define NDNBOOST_NO_MACRO_EXPAND /**/
 
 namespace ndnboost
 {
@@ -349,7 +349,7 @@
    template <class RT, class Policy>
    RT factorial(unsigned int, const Policy& pol);
    template <class RT>
-   RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
+   RT unchecked_factorial(unsigned int NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
    template <class RT>
    RT double_factorial(unsigned i);
    template <class RT, class Policy>
@@ -747,31 +747,31 @@
    typename tools::promote_args<T>::type cos_pi(T x);
 
    template <class T>
-   int fpclassify BOOST_NO_MACRO_EXPAND(T t);
+   int fpclassify NDNBOOST_NO_MACRO_EXPAND(T t);
 
    template <class T>
-   bool isfinite BOOST_NO_MACRO_EXPAND(T z);
+   bool isfinite NDNBOOST_NO_MACRO_EXPAND(T z);
 
    template <class T>
-   bool isinf BOOST_NO_MACRO_EXPAND(T t);
+   bool isinf NDNBOOST_NO_MACRO_EXPAND(T t);
 
    template <class T>
-   bool isnan BOOST_NO_MACRO_EXPAND(T t);
+   bool isnan NDNBOOST_NO_MACRO_EXPAND(T t);
 
    template <class T>
-   bool isnormal BOOST_NO_MACRO_EXPAND(T t);
+   bool isnormal NDNBOOST_NO_MACRO_EXPAND(T t);
 
    template<class T>
-   int signbit BOOST_NO_MACRO_EXPAND(T x);
+   int signbit NDNBOOST_NO_MACRO_EXPAND(T x);
 
    template <class T>
-   int sign BOOST_NO_MACRO_EXPAND(const T& z);
+   int sign NDNBOOST_NO_MACRO_EXPAND(const T& z);
 
    template <class T, class U>
-   typename tools::promote_args<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
+   typename tools::promote_args<T, U>::type copysign NDNBOOST_NO_MACRO_EXPAND(const T& x, const U& y);
 
    template <class T>
-   typename tools::promote_args<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
+   typename tools::promote_args<T>::type changesign NDNBOOST_NO_MACRO_EXPAND(const T& z);
 
    // Exponential integrals:
    namespace detail{
@@ -923,8 +923,8 @@
     } // namespace math
 } // namespace ndnboost
 
-#ifdef BOOST_HAS_LONG_LONG
-#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+#ifdef NDNBOOST_HAS_LONG_LONG
+#define NDNBOOST_MATH_DETAIL_LL_FUNC(Policy)\
    \
    template <class T>\
    inline T modf(const T& v, ndnboost::long_long_type* ipart){ using ndnboost::math::modf; return modf(v, ipart, Policy()); }\
@@ -936,12 +936,12 @@
    inline ndnboost::long_long_type llround(const T& v){ using ndnboost::math::llround; return llround(v, Policy()); }\
 
 #else
-#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
+#define NDNBOOST_MATH_DETAIL_LL_FUNC(Policy)
 #endif
 
-#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
+#define NDNBOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
    \
-   BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   NDNBOOST_MATH_DETAIL_LL_FUNC(Policy)\
    \
    template <class RT1, class RT2>\
    inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type \
@@ -1403,6 +1403,6 @@
 
 
 
-#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#endif // NDNBOOST_MATH_SPECIAL_MATH_FWD_HPP
 
 
diff --git a/include/ndnboost/math/special_functions/sign.hpp b/include/ndnboost/math/special_functions/sign.hpp
index fecacfb..e0fbd9e 100644
--- a/include/ndnboost/math/special_functions/sign.hpp
+++ b/include/ndnboost/math/special_functions/sign.hpp
@@ -6,8 +6,8 @@
 //  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_TOOLS_SIGN_HPP
-#define BOOST_MATH_TOOLS_SIGN_HPP
+#ifndef NDNBOOST_MATH_TOOLS_SIGN_HPP
+#define NDNBOOST_MATH_TOOLS_SIGN_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -23,7 +23,7 @@
 
   // signbit
 
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#ifdef NDNBOOST_MATH_USE_STD_FPCLASSIFY
     template<class T> 
     inline int signbit_impl(T x, native_tag const&)
     {
@@ -46,9 +46,9 @@
     template<class T> 
     inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         return a & traits::sign ? 1 : 0;
     }
@@ -56,9 +56,9 @@
     template<class T> 
     inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
 
         return a & traits::sign ? 1 : 0;
@@ -82,9 +82,9 @@
     template<class T>
     inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a ^= traits::sign;
         traits::set_bits(x,a);
@@ -94,9 +94,9 @@
     template<class T>
     inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&)
     {
-        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+        typedef NDNBOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
 
-        BOOST_DEDUCED_TYPENAME traits::bits a;
+        NDNBOOST_DEDUCED_TYPENAME traits::bits a;
         traits::get_bits(x,a);
         a ^= traits::sign;
         traits::set_bits(x,a);
@@ -116,7 +116,7 @@
 }
 
 template <class T>
-inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
+inline int sign NDNBOOST_NO_MACRO_EXPAND(const T& z)
 {
    return (z == 0) ? 0 : (ndnboost::math::signbit)(z) ? -1 : 1;
 }
@@ -133,9 +133,9 @@
 
 template <class T, class U>
 inline typename tools::promote_args<T, U>::type 
-   copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y)
+   copysign NDNBOOST_NO_MACRO_EXPAND(const T& x, const U& y)
 {
-   BOOST_MATH_STD_USING
+   NDNBOOST_MATH_STD_USING
    typedef typename tools::promote_args<T, U>::type result_type;
    return (ndnboost::math::signbit)(static_cast<result_type>(x)) != (ndnboost::math::signbit)(static_cast<result_type>(y)) 
       ? (ndnboost::math::changesign)(static_cast<result_type>(x)) : static_cast<result_type>(x);
@@ -145,6 +145,6 @@
 } // namespace ndnboost
 
 
-#endif // BOOST_MATH_TOOLS_SIGN_HPP
+#endif // NDNBOOST_MATH_TOOLS_SIGN_HPP
 
 
diff --git a/include/ndnboost/math/tools/config.hpp b/include/ndnboost/math/tools/config.hpp
index 8a2178c..77f03a5 100644
--- a/include/ndnboost/math/tools/config.hpp
+++ b/include/ndnboost/math/tools/config.hpp
@@ -3,8 +3,8 @@
 //  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_TOOLS_CONFIG_HPP
-#define BOOST_MATH_TOOLS_CONFIG_HPP
+#ifndef NDNBOOST_MATH_TOOLS_CONFIG_HPP
+#define NDNBOOST_MATH_TOOLS_CONFIG_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -25,18 +25,18 @@
 
 #if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
    || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
-   && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+   && !defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#if NDNBOOST_WORKAROUND(__BORLANDC__, NDNBOOST_TESTED_AT(0x582))
 //
 // Borland post 5.8.2 uses Dinkumware's std C lib which
 // doesn't have true long double precision.  Earlier
 // versions are problematic too:
 //
-#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
-#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#  define NDNBOOST_MATH_NO_REAL_CONCEPT_TESTS
+#  define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define NDNBOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
 #  include <float.h>
 #endif
 #ifdef __IBMCPP__
@@ -44,16 +44,16 @@
 // For reasons I don't unserstand, the tests with IMB's compiler all
 // pass at long double precision, but fail with real_concept, those tests
 // are disabled for now.  (JM 2012).
-#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#  define NDNBOOST_MATH_NO_REAL_CONCEPT_TESTS
 #endif
-#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
 //
 // Darwin's rather strange "double double" is rather hard to
 // support, it should be possible given enough effort though...
 //
-#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
-#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
 //
 // Intel compiler prior to version 10 has sporadic problems
 // calling the long double overloads of the std lib math functions:
@@ -66,7 +66,7 @@
 // Comment out this #define and try building the tests to determine whether
 // your Intel compiler version has this issue or not.
 //
-#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
 #if defined(unix) && defined(__INTEL_COMPILER)
 //
@@ -74,166 +74,166 @@
 // the exact OS version used.  Use our own code for this as we know it works
 // well on Intel processors:
 //
-#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#define NDNBOOST_MATH_DISABLE_STD_FPCLASSIFY
 #endif
 
-#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+#if defined(NDNBOOST_MSVC) && !defined(_WIN32_WCE)
    // Better safe than sorry, our tests don't support hardware exceptions:
-#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#  define NDNBOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
 #endif
 
 #ifdef __IBMCPP__
-#  define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#  define NDNBOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
 #endif
 
 #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
-#  define BOOST_MATH_USE_C99
+#  define NDNBOOST_MATH_USE_C99
 #endif
 
 #if (defined(__hpux) && !defined(__hppa))
-#  define BOOST_MATH_USE_C99
+#  define NDNBOOST_MATH_USE_C99
 #endif
 
 #if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
-#  define BOOST_MATH_USE_C99
+#  define NDNBOOST_MATH_USE_C99
 #endif
 
 #if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
-#  define BOOST_MATH_USE_C99
+#  define NDNBOOST_MATH_USE_C99
 #endif
 
-#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
-  || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
-  || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
-  || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-#  define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(NDNBOOST_INTEL) \
+  || defined(NDNBOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+  || (defined(__GNUC__) && !defined(NDNBOOST_MATH_USE_C99))\
+  || defined(NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define NDNBOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
 #endif
 
-#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+#if defined(NDNBOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || NDNBOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
 
 #  include "ndnboost/type.hpp"
 #  include "ndnboost/non_type.hpp"
 
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)         ndnboost::type<t>* = 0
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    ndnboost::type<t>*
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  ndnboost::non_type<t, v>* = 0
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  ndnboost::non_type<t, v>*
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)         ndnboost::type<t>* = 0
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    ndnboost::type<t>*
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  ndnboost::non_type<t, v>* = 0
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  ndnboost::non_type<t, v>*
 
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
-             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
-             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
-             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
-             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
+             , NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
+             , NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
+             , NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
+             , NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
 
 #else
 
 // no workaround needed: expand to nothing
 
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define NDNBOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
 
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define NDNBOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
 
 
-#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+#endif // defined NDNBOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
 
-#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
+#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(NDNBOOST_MATH_SMALL_CONSTANT)
 // Sun's compiler emits a hard error if a constant underflows,
 // as does aCC on PA-RISC, while gcc issues a large number of warnings:
-#  define BOOST_MATH_SMALL_CONSTANT(x) 0
+#  define NDNBOOST_MATH_SMALL_CONSTANT(x) 0
 #else
-#  define BOOST_MATH_SMALL_CONSTANT(x) x
+#  define NDNBOOST_MATH_SMALL_CONSTANT(x) x
 #endif
 
 
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+#if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, < 1400)
 //
 // Define if constants too large for a float cause "bad"
 // values to be stored in the data, rather than infinity
 // or a suitably large value.
 //
-#  define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#  define NDNBOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
 #endif
 //
 // Tune performance options for specific compilers:
 //
-#ifdef BOOST_MSVC
-#  define BOOST_MATH_POLY_METHOD 2
-#elif defined(BOOST_INTEL)
-#  define BOOST_MATH_POLY_METHOD 2
-#  define BOOST_MATH_RATIONAL_METHOD 2
+#ifdef NDNBOOST_MSVC
+#  define NDNBOOST_MATH_POLY_METHOD 2
+#elif defined(NDNBOOST_INTEL)
+#  define NDNBOOST_MATH_POLY_METHOD 2
+#  define NDNBOOST_MATH_RATIONAL_METHOD 2
 #elif defined(__GNUC__)
-#  define BOOST_MATH_POLY_METHOD 3
-#  define BOOST_MATH_RATIONAL_METHOD 3
-#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
-#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#  define NDNBOOST_MATH_POLY_METHOD 3
+#  define NDNBOOST_MATH_RATIONAL_METHOD 3
+#  define NDNBOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define NDNBOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
 #endif
 
-#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
-#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
-#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#if defined(NDNBOOST_NO_LONG_LONG) && !defined(NDNBOOST_MATH_INT_TABLE_TYPE)
+#  define NDNBOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define NDNBOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
 #endif
 
 //
 // The maximum order of polynomial that will be evaluated 
 // via an unrolled specialisation:
 //
-#ifndef BOOST_MATH_MAX_POLY_ORDER
-#  define BOOST_MATH_MAX_POLY_ORDER 17
+#ifndef NDNBOOST_MATH_MAX_POLY_ORDER
+#  define NDNBOOST_MATH_MAX_POLY_ORDER 17
 #endif 
 //
 // Set the method used to evaluate polynomials and rationals:
 //
-#ifndef BOOST_MATH_POLY_METHOD
-#  define BOOST_MATH_POLY_METHOD 1
+#ifndef NDNBOOST_MATH_POLY_METHOD
+#  define NDNBOOST_MATH_POLY_METHOD 1
 #endif 
-#ifndef BOOST_MATH_RATIONAL_METHOD
-#  define BOOST_MATH_RATIONAL_METHOD 0
+#ifndef NDNBOOST_MATH_RATIONAL_METHOD
+#  define NDNBOOST_MATH_RATIONAL_METHOD 0
 #endif 
 //
 // decide whether to store constants as integers or reals:
 //
-#ifndef BOOST_MATH_INT_TABLE_TYPE
-#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#ifndef NDNBOOST_MATH_INT_TABLE_TYPE
+#  define NDNBOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
 #endif
-#ifndef BOOST_MATH_INT_VALUE_SUFFIX
-#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#ifndef NDNBOOST_MATH_INT_VALUE_SUFFIX
+#  define NDNBOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
 #endif
 //
 // Test whether to support __float128:
 //
-#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(NDNBOOST_GCC) && !defined(__STRICT_ANSI__)
 //
 // Only enable this when the compiler really is GCC as clang and probably 
 // intel too don't support __float128 yet :-(
 //
-#  define BOOST_MATH_USE_FLOAT128
+#  define NDNBOOST_MATH_USE_FLOAT128
 #endif
 //
 // Check for WinCE with no iostream support:
 //
 #if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
-#  define BOOST_MATH_NO_LEXICAL_CAST
+#  define NDNBOOST_MATH_NO_LEXICAL_CAST
 #endif
 
 //
 // Helper macro for controlling the FP behaviour:
 //
-#ifndef BOOST_MATH_CONTROL_FP
-#  define BOOST_MATH_CONTROL_FP
+#ifndef NDNBOOST_MATH_CONTROL_FP
+#  define NDNBOOST_MATH_CONTROL_FP
 #endif
 //
 // Helper macro for using statements:
 //
-#define BOOST_MATH_STD_USING_CORE \
+#define NDNBOOST_MATH_STD_USING_CORE \
    using std::abs;\
    using std::acos;\
    using std::cos;\
@@ -258,20 +258,20 @@
    using std::log10;\
    using std::sqrt;
 
-#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
+#define NDNBOOST_MATH_STD_USING NDNBOOST_MATH_STD_USING_CORE
 
 namespace ndnboost{ namespace math{
 namespace tools
 {
 
 template <class T>
-inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
+inline T max NDNBOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
 {
    return (std::max)((std::max)(a, b), c);
 }
 
 template <class T>
-inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
+inline T max NDNBOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
 {
    return (std::max)((std::max)(a, b), (std::max)(c, d));
 }
@@ -285,7 +285,7 @@
 
 }} // namespace ndnboost namespace math
 
-#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(NDNBOOST_NO_FENV_H)
 
    #include <ndnboost/detail/fenv.hpp>
 
@@ -312,39 +312,39 @@
    } // namespace detail
    }} // namespaces
 
-#    define BOOST_FPU_EXCEPTION_GUARD ndnboost::math::detail::fpu_guard local_guard_object;
-#    define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); 
+#    define NDNBOOST_FPU_EXCEPTION_GUARD ndnboost::math::detail::fpu_guard local_guard_object;
+#    define NDNBOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); NDNBOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); 
 
 #  else
 
-#    define BOOST_FPU_EXCEPTION_GUARD
-#    define BOOST_MATH_INSTRUMENT_FPU
+#    define NDNBOOST_FPU_EXCEPTION_GUARD
+#    define NDNBOOST_MATH_INSTRUMENT_FPU
 
 #  endif
 
 #else // All other platforms.
-#  define BOOST_FPU_EXCEPTION_GUARD
-#  define BOOST_MATH_INSTRUMENT_FPU
+#  define NDNBOOST_FPU_EXCEPTION_GUARD
+#  define NDNBOOST_MATH_INSTRUMENT_FPU
 #endif
 
-#ifdef BOOST_MATH_INSTRUMENT
+#ifdef NDNBOOST_MATH_INSTRUMENT
 
 #  include <iostream>
 #  include <iomanip>
 #  include <typeinfo>
 
-#  define BOOST_MATH_INSTRUMENT_CODE(x) \
+#  define NDNBOOST_MATH_INSTRUMENT_CODE(x) \
       std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
-#  define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+#  define NDNBOOST_MATH_INSTRUMENT_VARIABLE(name) NDNBOOST_MATH_INSTRUMENT_CODE(NDNBOOST_STRINGIZE(name) << " = " << name)
 
 #else
 
-#  define BOOST_MATH_INSTRUMENT_CODE(x)
-#  define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+#  define NDNBOOST_MATH_INSTRUMENT_CODE(x)
+#  define NDNBOOST_MATH_INSTRUMENT_VARIABLE(name)
 
 #endif
 
-#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+#endif // NDNBOOST_MATH_TOOLS_CONFIG_HPP
 
 
 
diff --git a/include/ndnboost/math/tools/promotion.hpp b/include/ndnboost/math/tools/promotion.hpp
index aab6d34..d71fea9 100644
--- a/include/ndnboost/math/tools/promotion.hpp
+++ b/include/ndnboost/math/tools/promotion.hpp
@@ -15,8 +15,8 @@
 // Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
 // so you never get to instantiate any mixed foo(RT, IT) functions.
 
-#ifndef BOOST_MATH_PROMOTION_HPP
-#define BOOST_MATH_PROMOTION_HPP
+#ifndef NDNBOOST_MATH_PROMOTION_HPP
+#define NDNBOOST_MATH_PROMOTION_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -35,7 +35,7 @@
 #include <ndnboost/mpl/or.hpp> // for ndnboost::mpl::if_c.
 #include <ndnboost/mpl/not.hpp> // for ndnboost::mpl::if_c.
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #include <ndnboost/static_assert.hpp>
 #endif
 
@@ -134,11 +134,11 @@
             >::type
          >::type type;
 
-#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
          //
          // Guard against use of long double if it's not supported:
          //
-         BOOST_STATIC_ASSERT((0 == ::ndnboost::is_same<type, long double>::value));
+         NDNBOOST_STATIC_ASSERT((0 == ::ndnboost::is_same<type, long double>::value));
 #endif
       };
 
@@ -146,5 +146,5 @@
   } // namespace math
 } // namespace ndnboost
 
-#endif // BOOST_MATH_PROMOTION_HPP
+#endif // NDNBOOST_MATH_PROMOTION_HPP
 
diff --git a/include/ndnboost/math/tools/real_cast.hpp b/include/ndnboost/math/tools/real_cast.hpp
index 108dcbf..0a14612 100644
--- a/include/ndnboost/math/tools/real_cast.hpp
+++ b/include/ndnboost/math/tools/real_cast.hpp
@@ -3,8 +3,8 @@
 //  Boost Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
-#define BOOST_MATH_TOOLS_REAL_CAST_HPP
+#ifndef NDNBOOST_MATH_TOOLS_REAL_CAST_HPP
+#define NDNBOOST_MATH_TOOLS_REAL_CAST_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -23,7 +23,7 @@
 } // namespace math
 } // namespace ndnboost
 
-#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
+#endif // NDNBOOST_MATH_TOOLS_REAL_CAST_HPP
 
 
 
diff --git a/include/ndnboost/math/tools/user.hpp b/include/ndnboost/math/tools/user.hpp
index c1bdaf7..b822459 100644
--- a/include/ndnboost/math/tools/user.hpp
+++ b/include/ndnboost/math/tools/user.hpp
@@ -6,8 +6,8 @@
 // (See accompanying file LICENSE_1_0.txt
 // or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_MATH_TOOLS_USER_HPP
-#define BOOST_MATH_TOOLS_USER_HPP
+#ifndef NDNBOOST_MATH_TOOLS_USER_HPP
+#define NDNBOOST_MATH_TOOLS_USER_HPP
 
 #ifdef _MSC_VER
 #pragma once
@@ -19,79 +19,79 @@
 // define this if the platform has no long double functions,
 // or if the long double versions have only double precision:
 //
-// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+// #define NDNBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 //
 // Performance tuning options:
 //
-// #define BOOST_MATH_POLY_METHOD 3
-// #define BOOST_MATH_RATIONAL_METHOD 3
+// #define NDNBOOST_MATH_POLY_METHOD 3
+// #define NDNBOOST_MATH_RATIONAL_METHOD 3
 //
 // The maximum order of polynomial that will be evaluated
 // via an unrolled specialisation:
 //
-// #define BOOST_MATH_MAX_POLY_ORDER 17
+// #define NDNBOOST_MATH_MAX_POLY_ORDER 17
 //
 // decide whether to store constants as integers or reals:
 //
-// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+// #define NDNBOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
 
 //
 // Default policies follow:
 //
 // Domain errors:
 //
-// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+// #define NDNBOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
 //
 // Pole errors:
 //
-// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+// #define NDNBOOST_MATH_POLE_ERROR_POLICY throw_on_error
 //
 // Overflow Errors:
 //
-// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+// #define NDNBOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
 //
 // Internal Evaluation Errors:
 //
-// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+// #define NDNBOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
 //
 // Underfow:
 //
-// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+// #define NDNBOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
 //
 // Denorms:
 //
-// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+// #define NDNBOOST_MATH_DENORM_ERROR_POLICY ignore_error
 //
 // Max digits to use for internal calculations:
 //
-// #define BOOST_MATH_DIGITS10_POLICY 0
+// #define NDNBOOST_MATH_DIGITS10_POLICY 0
 //
 // Promote floats to doubles internally?
 //
-// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+// #define NDNBOOST_MATH_PROMOTE_FLOAT_POLICY true
 //
 // Promote doubles to long double internally:
 //
-// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+// #define NDNBOOST_MATH_PROMOTE_DOUBLE_POLICY true
 //
 // What do discrete quantiles return?
 //
-// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+// #define NDNBOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
 //
 // If a function is mathematically undefined
 // (for example the Cauchy distribution has no mean),
 // then do we stop the code from compiling?
 //
-// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+// #define NDNBOOST_MATH_ASSERT_UNDEFINED_POLICY true
 //
 // Maximum series iterstions permitted:
 //
-// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+// #define NDNBOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
 //
 // Maximum root finding steps permitted:
 //
-// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+// define NDNBOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
 
-#endif // BOOST_MATH_TOOLS_USER_HPP
+#endif // NDNBOOST_MATH_TOOLS_USER_HPP