]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/src/tr1/fpclassify.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / math / src / tr1 / fpclassify.cpp
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)
5 //
6 # include <pch.hpp>
7 #ifndef BOOST_MATH_TR1_SOURCE
8 # define BOOST_MATH_TR1_SOURCE
9 #endif
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"
14
15 #if defined (_MSC_VER)
16 # pragma warning(push)
17 # pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning)
18 #endif
19
20 namespace boost{ namespace math{ namespace tr1{
21
22 template<> bool BOOST_MATH_TR1_DECL signbit<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
23 {
24 return static_cast<bool>((boost::math::signbit)(x));
25 }
26
27 template<> int BOOST_MATH_TR1_DECL fpclassify<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
28 {
29 return (boost::math::fpclassify)(x);
30 }
31
32 template<> bool BOOST_MATH_TR1_DECL isfinite<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
33 {
34 return (boost::math::isfinite)(x);
35 }
36
37 template<> bool BOOST_MATH_TR1_DECL isinf<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
38 {
39 return (boost::math::isinf)(x);
40 }
41
42 template<> bool BOOST_MATH_TR1_DECL isnan<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
43 {
44 return (boost::math::isnan)(x);
45 }
46
47 template<> bool BOOST_MATH_TR1_DECL isnormal<double> BOOST_PREVENT_MACRO_SUBSTITUTION(double x)
48 {
49 return (boost::math::isnormal)(x);
50 }
51
52 }}} // namespace boost{ namespace math{ namespace tr1{
53
54 #if defined (_MSC_VER)
55 # pragma warning(pop)
56 #endif