1 // Copyright John Maddock 2008.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_MATH_TR1_SOURCE
8 # define BOOST_MATH_TR1_SOURCE
10 #include <boost/math/tr1.hpp>
11 #include <boost/math/special_functions/fpclassify.hpp>
12 #include <boost/math/special_functions/sign.hpp>
13 #include "c_policy.hpp"
15 #if defined (_MSC_VER)
16 # pragma warning(push)
17 # pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning)
20 namespace boost
{ namespace math
{ namespace tr1
{
22 template<> bool BOOST_MATH_TR1_DECL signbit
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
24 return static_cast<bool>((boost::math::signbit
)(x
));
27 template<> int BOOST_MATH_TR1_DECL fpclassify
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
29 return (boost::math::fpclassify
)(x
);
32 template<> bool BOOST_MATH_TR1_DECL isfinite
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
34 return (boost::math::isfinite
)(x
);
37 template<> bool BOOST_MATH_TR1_DECL isinf
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
39 return (boost::math::isinf
)(x
);
42 template<> bool BOOST_MATH_TR1_DECL isnan
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
44 return (boost::math::isnan
)(x
);
47 template<> bool BOOST_MATH_TR1_DECL isnormal
<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x
)
49 return (boost::math::isnormal
)(x
);
52 }}} // namespace boost{ namespace math{ namespace tr1{
54 #if defined (_MSC_VER)