// (C) Copyright John Maddock 2021. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // We deliberately use assert in here: // #ifndef BOOST_MP_TOOLS_FLOAT128_HPP #define BOOST_MP_TOOLS_FLOAT128_HPP #include #include #ifdef BOOST_HAS_FLOAT128 namespace boost { namespace multiprecision { namespace float128_procs { using namespace boost::math::cstdfloat::detail; extern "C" int quadmath_snprintf(char *str, size_t size, const char *format, ...) throw(); extern "C" boost::math::cstdfloat::detail::float_internal128_t strtoflt128(const char*, char **) throw(); } // float128_procs namespace detail { template struct is_float128 : public std::is_same{}; } // detail } // float128_procs } // multiprecision namespace boost { namespace math { inline boost::math::cstdfloat::detail::float_internal128_t float_next(const boost::math::cstdfloat::detail::float_internal128_t& f) { return nextafter(f, 2 * f); } } // math } // boost #define BOOST_MP_FLOAT128_USING using boost::multiprecision::float128_procs::ldexp; using boost::multiprecision::float128_procs::frexp; using boost::multiprecision::float128_procs::floor; using boost::math::isinf; using boost::math::isnan; #else #define BOOST_MP_FLOAT128_USING namespace boost { namespace multiprecision { namespace detail { template struct is_float128 : public std::false_type{}; } // detail } // multiprecision } // boost #endif #endif // BOOST_MP_TOOLS_FLOAT128_HPP