Browse Source

Drop MSVC-specific workaround for using int128 implementation from boost

thegeorg 2 years ago
parent
commit
7b2317ba8b

+ 0 - 1
contrib/libs/apache/arrow/CMakeLists.txt

@@ -57,7 +57,6 @@ target_link_libraries(libs-apache-arrow PUBLIC
   contrib-libs-xxhash
   ZLIB::ZLIB
   contrib-libs-zstd
-  restricted-boost-multiprecision
   contrib-restricted-fast_float
   contrib-restricted-thrift
   contrib-restricted-uriparser

+ 1 - 1
contrib/libs/apache/arrow/cpp/src/arrow/util/int128_internal.h

@@ -20,7 +20,7 @@
 #include "arrow/util/macros.h"
 
 #ifndef ARROW_USE_NATIVE_INT128
-#include <boost/multiprecision/cpp_int.hpp>
+#error #include <boost/multiprecision/cpp_int.hpp>
 #endif
 
 namespace arrow {

+ 0 - 2
contrib/libs/apache/arrow/src/arrow/util/config.h

@@ -43,8 +43,6 @@
 #define ARROW_JSON
 
 /* #undef ARROW_S3 */
-#ifdef __GNUC__
 #define ARROW_USE_NATIVE_INT128
-#endif
 
 /* #undef GRPCPP_PP_INCLUDE */

+ 0 - 1
contrib/restricted/boost/CMakeLists.darwin.txt

@@ -56,7 +56,6 @@ add_subdirectory(mp11)
 add_subdirectory(mpl)
 add_subdirectory(multi_array)
 add_subdirectory(multi_index)
-add_subdirectory(multiprecision)
 add_subdirectory(numeric_conversion)
 add_subdirectory(optional)
 add_subdirectory(parameter)

+ 0 - 1
contrib/restricted/boost/CMakeLists.linux-aarch64.txt

@@ -53,7 +53,6 @@ add_subdirectory(mp11)
 add_subdirectory(mpl)
 add_subdirectory(multi_array)
 add_subdirectory(multi_index)
-add_subdirectory(multiprecision)
 add_subdirectory(numeric_conversion)
 add_subdirectory(optional)
 add_subdirectory(parameter)

+ 0 - 1
contrib/restricted/boost/CMakeLists.linux.txt

@@ -56,7 +56,6 @@ add_subdirectory(mp11)
 add_subdirectory(mpl)
 add_subdirectory(multi_array)
 add_subdirectory(multi_index)
-add_subdirectory(multiprecision)
 add_subdirectory(numeric_conversion)
 add_subdirectory(optional)
 add_subdirectory(parameter)

+ 0 - 58
contrib/restricted/boost/math/include/boost/cstdfloat.hpp

@@ -1,58 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2014.
-// Copyright John Maddock 2014.
-// Copyright Paul Bristow 2014.
-// Distributed under 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)
-//
-
-// <boost/cstdfloat.hpp> implements floating-point typedefs having
-// specified widths, as described in N3626 (proposed for C++14).
-// See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf
-
-#ifndef BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_
-  #define BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_
-
-  // Include the floating-point type definitions.
-  #include <boost/math/cstdfloat/cstdfloat_types.hpp>
-
-  // Support a specialization of std::numeric_limits<> for the wrapped quadmath library (if available).
-  #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS)
-    #include <boost/math/cstdfloat/cstdfloat_limits.hpp>
-  #endif
-
-  // Support <cmath> functions for the wrapped quadmath library (if available).
-  #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH)
-    #include <boost/math/cstdfloat/cstdfloat_cmath.hpp>
-  #endif
-
-  // Support I/O stream operations for the wrapped quadmath library (if available).
-  #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM)
-    #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH)
-    #error You can not use <boost/math/cstdfloat/cstdfloat_iostream.hpp> with BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH defined.
-    #endif
-    #include <boost/math/cstdfloat/cstdfloat_iostream.hpp>
-  #endif
-
-  // Support a specialization of std::complex<> for the wrapped quadmath library (if available).
-  #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_COMPLEX)
-    #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS)
-    #error You can not use <boost/math/cstdfloat/cstdfloat_complex.hpp> with BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS defined.
-    #endif
-    #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH)
-    #error You can not use <boost/math/cstdfloat/cstdfloat_complex.hpp> with BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH defined.
-    #endif
-    #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM)
-    #error You can not use <boost/math/cstdfloat/cstdfloat_complex.hpp> with BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM defined.
-    #endif
-    #include <boost/math/cstdfloat/cstdfloat_complex.hpp>
-  #endif
-
-
-  // Undefine BOOST_NO_FLOAT128_T because this constant is not meant for public use.
-  #if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T)
-  #undef BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T
-  #endif
-
-#endif // BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_

+ 0 - 1110
contrib/restricted/boost/math/include/boost/math/constants/calculate_constants.hpp

@@ -1,1110 +0,0 @@
-//  Copyright John Maddock 2010, 2012.
-//  Copyright Paul A. Bristow 2011, 2012.
-
-//  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)
-
-#ifndef BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
-#define BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
-#include <type_traits>
-
-namespace boost{ namespace math{ namespace constants{ namespace detail{
-
-template <class T>
-template<int N>
-inline T constant_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-
-   return ldexp(acos(T(0)), 1);
-
-   /*
-   // Although this code works well, it's usually more accurate to just call acos
-   // and access the number types own representation of PI which is usually calculated
-   // at slightly higher precision...
-
-   T result;
-   T a = 1;
-   T b;
-   T A(a);
-   T B = 0.5f;
-   T D = 0.25f;
-
-   T lim;
-   lim = boost::math::tools::epsilon<T>();
-
-   unsigned k = 1;
-
-   do
-   {
-      result = A + B;
-      result = ldexp(result, -2);
-      b = sqrt(B);
-      a += b;
-      a = ldexp(a, -1);
-      A = a * a;
-      B = A - result;
-      B = ldexp(B, 1);
-      result = A - B;
-      bool neg = boost::math::sign(result) < 0;
-      if(neg)
-         result = -result;
-      if(result <= lim)
-         break;
-      if(neg)
-         result = -result;
-      result = ldexp(result, k - 1);
-      D -= result;
-      ++k;
-      lim = ldexp(lim, 1);
-   }
-   while(true);
-
-   result = B / D;
-   return result;
-   */
-}
-
-template <class T>
-template<int N>
-inline T constant_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 2 * pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T> // 2 / pi
-template<int N>
-inline T constant_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 2 / pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>  // sqrt(2/pi)
-template <int N>
-inline T constant_root_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt((2 / pi<T, policies::policy<policies::digits2<N> > >()));
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 1 / two_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_root_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(pi<T, policies::policy<policies::digits2<N> > >() / 2);
-}
-
-template <class T>
-template<int N>
-inline T constant_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(two_pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_log_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return log(root_two_pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_root_ln_four<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(log(static_cast<T>(4)));
-}
-
-template <class T>
-template<int N>
-inline T constant_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   //
-   // Although we can clearly calculate this from first principles, this hooks into
-   // T's own notion of e, which hopefully will more accurate than one calculated to
-   // a few epsilon:
-   //
-   BOOST_MATH_STD_USING
-   return exp(static_cast<T>(1));
-}
-
-template <class T>
-template<int N>
-inline T constant_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return static_cast<T>(1) / static_cast<T>(2);
-}
-
-template <class T>
-template<int M>
-inline T constant_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, M>)))
-{
-   BOOST_MATH_STD_USING
-   //
-   // This is the method described in:
-   // "Some New Algorithms for High-Precision Computation of Euler's Constant"
-   // Richard P Brent and Edwin M McMillan.
-   // Mathematics of Computation, Volume 34, Number 149, Jan 1980, pages 305-312.
-   // See equation 17 with p = 2.
-   //
-   T n = 3 + (M ? (std::min)(M, tools::digits<T>()) : tools::digits<T>()) / 4;
-   T lim = M ? ldexp(T(1), 1 - (std::min)(M, tools::digits<T>())) : tools::epsilon<T>();
-   T lnn = log(n);
-   T term = 1;
-   T N = -lnn;
-   T D = 1;
-   T Hk = 0;
-   T one = 1;
-
-   for(unsigned k = 1;; ++k)
-   {
-      term *= n * n;
-      term /= k * k;
-      Hk += one / k;
-      N += term * (Hk - lnn);
-      D += term;
-
-      if(term < D * lim)
-         break;
-   }
-   return N / D;
-}
-
-template <class T>
-template<int N>
-inline T constant_euler_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  BOOST_MATH_STD_USING
-  return euler<T, policies::policy<policies::digits2<N> > >()
-     * euler<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  BOOST_MATH_STD_USING
-  return static_cast<T>(1)
-     / euler<T, policies::policy<policies::digits2<N> > >();
-}
-
-
-template <class T>
-template<int N>
-inline T constant_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(static_cast<T>(2));
-}
-
-
-template <class T>
-template<int N>
-inline T constant_root_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(static_cast<T>(3));
-}
-
-template <class T>
-template<int N>
-inline T constant_half_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(static_cast<T>(2)) / 2;
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   //
-   // Although there are good ways to calculate this from scratch, this hooks into
-   // T's own notion of log(2) which will hopefully be accurate to the full precision
-   // of T:
-   //
-   BOOST_MATH_STD_USING
-   return log(static_cast<T>(2));
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_ten<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return log(static_cast<T>(10));
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return log(log(static_cast<T>(2)));
-}
-
-template <class T>
-template<int N>
-inline T constant_third<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(1) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_twothirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_two_thirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_three_quarters<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(3) / static_cast<T>(4);
-}
-
-template <class T>
-template<int N>
-inline T constant_sixth<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  BOOST_MATH_STD_USING
-  return static_cast<T>(1) / static_cast<T>(6);
-}
-
-// Pi and related constants.
-template <class T>
-template<int N>
-inline T constant_pi_minus_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_four_minus_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return static_cast<T>(4) - pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_exp_minus_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return exp(static_cast<T>(-0.5));
-}
-
-template <class T>
-template<int N>
-inline T constant_exp_minus_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  BOOST_MATH_STD_USING
-  return exp(static_cast<T>(-1.));
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return static_cast<T>(1) / root_two<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return static_cast<T>(1) / root_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return static_cast<T>(1) / root_two_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_root_one_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(static_cast<T>(1) / pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_four_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(4) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()  / static_cast<T>(2);
-}
-
-template <class T>
-template<int N>
-inline T constant_third_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()  / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_sixth_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()  / static_cast<T>(6);
-}
-
-template <class T>
-template<int N>
-inline T constant_two_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_three_quarters_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(3) / static_cast<T>(4);
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_pow_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pow(pi<T, policies::policy<policies::digits2<N> > >(), e<T, policies::policy<policies::digits2<N> > >()); //
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()
-   *      pi<T, policies::policy<policies::digits2<N> > >() ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_sqr_div_six<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()
-   *      pi<T, policies::policy<policies::digits2<N> > >()
-   / static_cast<T>(6); //
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_cubed<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()
-   *      pi<T, policies::policy<policies::digits2<N> > >()
-   *      pi<T, policies::policy<policies::digits2<N> > >()
-   ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(1)
-   / pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
-}
-
-// Euler's e
-
-template <class T>
-template<int N>
-inline T constant_e_pow_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pow(e<T, policies::policy<policies::digits2<N> > >(), pi<T, policies::policy<policies::digits2<N> > >()); //
-}
-
-template <class T>
-template<int N>
-inline T constant_root_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sqrt(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return log10(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return  static_cast<T>(1) /
-     log10(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-// Trigonometric
-
-template <class T>
-template<int N>
-inline T constant_degree<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return pi<T, policies::policy<policies::digits2<N> > >()
-   / static_cast<T>(180)
-   ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_radian<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(180)
-   / pi<T, policies::policy<policies::digits2<N> > >()
-   ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_sin_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sin(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cos_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return cos(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_sinh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return sinh(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cosh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return cosh(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return (static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-   return static_cast<T>(1) /
-     log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
-}
-
-// Zeta
-
-template <class T>
-template<int N>
-inline T constant_zeta_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   BOOST_MATH_STD_USING
-
-     return pi<T, policies::policy<policies::digits2<N> > >()
-     *  pi<T, policies::policy<policies::digits2<N> > >()
-     /static_cast<T>(6);
-}
-
-template <class T>
-template<int N>
-inline T constant_zeta_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   // http://mathworld.wolfram.com/AperysConstant.html
-   // http://en.wikipedia.org/wiki/Mathematical_constant
-
-   // http://oeis.org/A002117/constant
-   //T zeta3("1.20205690315959428539973816151144999076"
-   // "4986292340498881792271555341838205786313"
-   // "09018645587360933525814619915");
-
-  //"1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915"  A002117
-  // 1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915780, +00);
-  //"1.2020569031595942 double
-  // http://www.spaennare.se/SSPROG/ssnum.pdf  // section 11, Algorithm for Apery's constant zeta(3).
-  // Programs to Calculate some Mathematical Constants to Large Precision, Document Version 1.50
-
-  // by Stefan Spannare  September 19, 2007
-  // zeta(3) = 1/64 * sum
-   BOOST_MATH_STD_USING
-   T n_fact=static_cast<T>(1); // build n! for n = 0.
-   T sum = static_cast<double>(77); // Start with n = 0 case.
-   // for n = 0, (77/1) /64 = 1.203125
-   //double lim = std::numeric_limits<double>::epsilon();
-   T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
-   for(unsigned int n = 1; n < 40; ++n)
-   { // three to five decimal digits per term, so 40 should be plenty for 100 decimal digits.
-      //cout << "n = " << n << endl;
-      n_fact *= n; // n!
-      T n_fact_p10 = n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact; // (n!)^10
-      T num = ((205 * n * n) + (250 * n) + 77) * n_fact_p10; // 205n^2 + 250n + 77
-      // int nn = (2 * n + 1);
-      // T d = factorial(nn); // inline factorial.
-      T d = 1;
-      for(unsigned int i = 1; i <= (n+n + 1); ++i) // (2n + 1)
-      {
-        d *= i;
-      }
-      T den = d * d * d * d * d; // [(2n+1)!]^5
-      //cout << "den = " << den << endl;
-      T term = num/den;
-      if (n % 2 != 0)
-      { //term *= -1;
-        sum -= term;
-      }
-      else
-      {
-        sum += term;
-      }
-      //cout << "term = " << term << endl;
-      //cout << "sum/64  = " << sum/64 << endl;
-      if(abs(term) < lim)
-      {
-         break;
-      }
-   }
-   return sum / 64;
-}
-
-template <class T>
-template<int N>
-inline T constant_catalan<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{ // http://oeis.org/A006752/constant
-  //T c("0.915965594177219015054603514932384110774"
- //"149374281672134266498119621763019776254769479356512926115106248574");
-
-  // 9.159655941772190150546035149323841107, 74149374281672134266498119621763019776254769479356512926115106248574422619, -01);
-
-   // This is equation (entry) 31 from
-   // http://www-2.cs.cmu.edu/~adamchik/articles/catalan/catalan.htm
-   // See also http://www.mpfr.org/algorithms.pdf
-   BOOST_MATH_STD_USING
-   T k_fact = 1;
-   T tk_fact = 1;
-   T sum = 1;
-   T term;
-   T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
-
-   for(unsigned k = 1;; ++k)
-   {
-      k_fact *= k;
-      tk_fact *= (2 * k) * (2 * k - 1);
-      term = k_fact * k_fact / (tk_fact * (2 * k + 1) * (2 * k + 1));
-      sum += term;
-      if(term < lim)
-      {
-         break;
-      }
-   }
-   return boost::math::constants::pi<T, boost::math::policies::policy<> >()
-      * log(2 + boost::math::constants::root_three<T, boost::math::policies::policy<> >())
-       / 8
-      + 3 * sum / 8;
-}
-
-namespace khinchin_detail{
-
-template <class T>
-T zeta_polynomial_series(T s, T sc, int digits)
-{
-   BOOST_MATH_STD_USING
-   //
-   // This is algorithm 3 from:
-   //
-   // "An Efficient Algorithm for the Riemann Zeta Function", P. Borwein,
-   // Canadian Mathematical Society, Conference Proceedings, 2000.
-   // See: http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P155.pdf
-   //
-   BOOST_MATH_STD_USING
-   int n = (digits * 19) / 53;
-   T sum = 0;
-   T two_n = ldexp(T(1), n);
-   int ej_sign = 1;
-   for(int j = 0; j < n; ++j)
-   {
-      sum += ej_sign * -two_n / pow(T(j + 1), s);
-      ej_sign = -ej_sign;
-   }
-   T ej_sum = 1;
-   T ej_term = 1;
-   for(int j = n; j <= 2 * n - 1; ++j)
-   {
-      sum += ej_sign * (ej_sum - two_n) / pow(T(j + 1), s);
-      ej_sign = -ej_sign;
-      ej_term *= 2 * n - j;
-      ej_term /= j - n + 1;
-      ej_sum += ej_term;
-   }
-   return -sum / (two_n * (1 - pow(T(2), sc)));
-}
-
-template <class T>
-T khinchin(int digits)
-{
-   BOOST_MATH_STD_USING
-   T sum = 0;
-   T term;
-   T lim = ldexp(T(1), 1-digits);
-   T factor = 0;
-   unsigned last_k = 1;
-   T num = 1;
-   for(unsigned n = 1;; ++n)
-   {
-      for(unsigned k = last_k; k <= 2 * n - 1; ++k)
-      {
-         factor += num / k;
-         num = -num;
-      }
-      last_k = 2 * n;
-      term = (zeta_polynomial_series(T(2 * n), T(1 - T(2 * n)), digits) - 1) * factor / n;
-      sum += term;
-      if(term < lim)
-         break;
-   }
-   return exp(sum / boost::math::constants::ln_two<T, boost::math::policies::policy<> >());
-}
-
-}
-
-template <class T>
-template<int N>
-inline T constant_khinchin<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
-   return khinchin_detail::khinchin<T>(n);
-}
-
-template <class T>
-template<int N>
-inline T constant_extreme_value_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{  // N[12 Sqrt[6]  Zeta[3]/Pi^3, 1101]
-   BOOST_MATH_STD_USING
-   T ev(12 * sqrt(static_cast<T>(6)) * zeta_three<T, policies::policy<policies::digits2<N> > >()
-    / pi_cubed<T, policies::policy<policies::digits2<N> > >() );
-
-//T ev(
-//"1.1395470994046486574927930193898461120875997958365518247216557100852480077060706857071875468869385150"
-//"1894272048688553376986765366075828644841024041679714157616857834895702411080704529137366329462558680"
-//"2015498788776135705587959418756809080074611906006528647805347822929577145038743873949415294942796280"
-//"0895597703063466053535550338267721294164578901640163603544404938283861127819804918174973533694090594"
-//"3094963822672055237678432023017824416203652657301470473548274848068762500300316769691474974950757965"
-//"8640779777748741897542093874605477776538884083378029488863880220988107155275203245233994097178778984"
-//"3488995668362387892097897322246698071290011857605809901090220903955815127463328974447572119951192970"
-//"3684453635456559086126406960279692862247058250100678008419431185138019869693206366891639436908462809"
-//"9756051372711251054914491837034685476095423926553367264355374652153595857163724698198860485357368964"
-//"3807049634423621246870868566707915720704996296083373077647528285782964567312903914752617978405994377"
-//"9064157147206717895272199736902453130842229559980076472936976287378945035706933650987259357729800315");
-
-  return ev;
-}
-
-namespace detail{
-//
-// Calculation of the Glaisher constant depends upon calculating the
-// derivative of the zeta function at 2, we can then use the relation:
-// zeta'(2) = 1/6 pi^2 [euler + ln(2pi)-12ln(A)]
-// To get the constant A.
-// See equation 45 at http://mathworld.wolfram.com/RiemannZetaFunction.html.
-//
-// The derivative of the zeta function is computed by direct differentiation
-// of the relation:
-// (1-2^(1-s))zeta(s) = SUM(n=0, INF){ (-n)^n / (n+1)^s  }
-// Which gives us 2 slowly converging but alternating sums to compute,
-// for this we use Algorithm 1 from "Convergent Acceleration of Alternating Series",
-// Henri Cohen, Fernando Rodriguez Villegas and Don Zagier, Experimental Mathematics 9:1 (1999).
-// See http://www.math.utexas.edu/users/villegas/publications/conv-accel.pdf
-//
-template <class T>
-T zeta_series_derivative_2(unsigned digits)
-{
-   // Derivative of the series part, evaluated at 2:
-   BOOST_MATH_STD_USING
-   int n = digits * 301 * 13 / 10000;
-   T d = pow(3 + sqrt(T(8)), n);
-   d = (d + 1 / d) / 2;
-   T b = -1;
-   T c = -d;
-   T s = 0;
-   for(int k = 0; k < n; ++k)
-   {
-      T a = -log(T(k+1)) / ((k+1) * (k+1));
-      c = b - c;
-      s = s + c * a;
-      b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
-   }
-   return s / d;
-}
-
-template <class T>
-T zeta_series_2(unsigned digits)
-{
-   // Series part of zeta at 2:
-   BOOST_MATH_STD_USING
-   int n = digits * 301 * 13 / 10000;
-   T d = pow(3 + sqrt(T(8)), n);
-   d = (d + 1 / d) / 2;
-   T b = -1;
-   T c = -d;
-   T s = 0;
-   for(int k = 0; k < n; ++k)
-   {
-      T a = T(1) / ((k + 1) * (k + 1));
-      c = b - c;
-      s = s + c * a;
-      b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
-   }
-   return s / d;
-}
-
-template <class T>
-inline T zeta_series_lead_2()
-{
-   // lead part at 2:
-   return 2;
-}
-
-template <class T>
-inline T zeta_series_derivative_lead_2()
-{
-   // derivative of lead part at 2:
-   return -2 * boost::math::constants::ln_two<T>();
-}
-
-template <class T>
-inline T zeta_derivative_2(unsigned n)
-{
-   // zeta derivative at 2:
-   return zeta_series_derivative_2<T>(n) * zeta_series_lead_2<T>()
-      + zeta_series_derivative_lead_2<T>() * zeta_series_2<T>(n);
-}
-
-}  // namespace detail
-
-template <class T>
-template<int N>
-inline T constant_glaisher<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-
-   BOOST_MATH_STD_USING
-   typedef policies::policy<policies::digits2<N> > forwarding_policy;
-   int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
-   T v = detail::zeta_derivative_2<T>(n);
-   v *= 6;
-   v /= boost::math::constants::pi<T, forwarding_policy>() * boost::math::constants::pi<T, forwarding_policy>();
-   v -= boost::math::constants::euler<T, forwarding_policy>();
-   v -= log(2 * boost::math::constants::pi<T, forwarding_policy>());
-   v /= -12;
-   return exp(v);
-
-   /*
-   // from http://mpmath.googlecode.com/svn/data/glaisher.txt
-     // 20,000 digits of the Glaisher-Kinkelin constant A = exp(1/2 - zeta'(-1))
-     // Computed using A = exp((6 (-zeta'(2))/pi^2 + log 2 pi + gamma)/12)
-   // with Euler-Maclaurin summation for zeta'(2).
-   T g(
-   "1.282427129100622636875342568869791727767688927325001192063740021740406308858826"
-   "46112973649195820237439420646120399000748933157791362775280404159072573861727522"
-   "14334327143439787335067915257366856907876561146686449997784962754518174312394652"
-   "76128213808180219264516851546143919901083573730703504903888123418813674978133050"
-   "93770833682222494115874837348064399978830070125567001286994157705432053927585405"
-   "81731588155481762970384743250467775147374600031616023046613296342991558095879293"
-   "36343887288701988953460725233184702489001091776941712153569193674967261270398013"
-   "52652668868978218897401729375840750167472114895288815996668743164513890306962645"
-   "59870469543740253099606800842447417554061490189444139386196089129682173528798629"
-   "88434220366989900606980888785849587494085307347117090132667567503310523405221054"
-   "14176776156308191919997185237047761312315374135304725819814797451761027540834943"
-   "14384965234139453373065832325673954957601692256427736926358821692159870775858274"
-   "69575162841550648585890834128227556209547002918593263079373376942077522290940187");
-
-   return g;
-   */
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{  // 1100 digits of the Rayleigh distribution skewness
-   // N[2 Sqrt[Pi] (Pi - 3)/((4 - Pi)^(3/2)), 1100]
-
-   BOOST_MATH_STD_USING
-   T rs(2 * root_pi<T, policies::policy<policies::digits2<N> > >()
-      * pi_minus_three<T, policies::policy<policies::digits2<N> > >()
-      / pow(four_minus_pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(3./2))
-      );
-   //   6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264,
-
-   //"0.6311106578189371381918993515442277798440422031347194976580945856929268196174737254599050270325373067"
-   //"9440004726436754739597525250317640394102954301685809920213808351450851396781817932734836994829371322"
-   //"5797376021347531983451654130317032832308462278373358624120822253764532674177325950686466133508511968"
-   //"2389168716630349407238090652663422922072397393006683401992961569208109477307776249225072042971818671"
-   //"4058887072693437217879039875871765635655476241624825389439481561152126886932506682176611183750503553"
-   //"1218982627032068396407180216351425758181396562859085306247387212297187006230007438534686340210168288"
-   //"8956816965453815849613622117088096547521391672977226658826566757207615552041767516828171274858145957"
-   //"6137539156656005855905288420585194082284972984285863898582313048515484073396332610565441264220790791"
-   //"0194897267890422924599776483890102027823328602965235306539844007677157873140562950510028206251529523"
-   //"7428049693650605954398446899724157486062545281504433364675815915402937209673727753199567661561209251"
-   //"4695589950526053470201635372590001578503476490223746511106018091907936826431407434894024396366284848");  ;
-   return rs;
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_kurtosis_excess<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{ // - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
-    // Might provide and calculate this using pi_minus_four.
-   BOOST_MATH_STD_USING
-   return - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
-        * pi<T, policies::policy<policies::digits2<N> > >())
-   - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
-   /
-   ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
-   * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
-   );
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_kurtosis<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{ // 3 - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
-  // Might provide and calculate this using pi_minus_four.
-   BOOST_MATH_STD_USING
-   return static_cast<T>(3) - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
-        * pi<T, policies::policy<policies::digits2<N> > >())
-   - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
-   /
-   ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
-   * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
-   );
-}
-
-template <class T>
-template<int N>
-inline T constant_log2_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 1 / boost::math::constants::ln_two<T>();
-}
-
-template <class T>
-template<int N>
-inline T constant_quarter_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return boost::math::constants::pi<T>() / 4;
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 1 / boost::math::constants::pi<T>();
-}
-
-template <class T>
-template<int N>
-inline T constant_two_div_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   return 2 * boost::math::constants::one_div_root_pi<T>();
-}
-
-#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
-template <class T>
-template<int N>
-inline T constant_first_feigenbaum<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   // We know the constant to 1018 decimal digits.
-   // See:  http://www.plouffe.fr/simon/constants/feigenbaum.txt
-   // Also: https://oeis.org/A006890
-   // N is in binary digits; so we multiply by log_2(10)
-
-   static_assert(N < 3.321*1018, "\nThe first Feigenbaum constant cannot be computed at runtime; it is too expensive. It is known to 1018 decimal digits; you must request less than that.");
-   T alpha{"4.6692016091029906718532038204662016172581855774757686327456513430041343302113147371386897440239480138171659848551898151344086271420279325223124429888908908599449354632367134115324817142199474556443658237932020095610583305754586176522220703854106467494942849814533917262005687556659523398756038256372256480040951071283890611844702775854285419801113440175002428585382498335715522052236087250291678860362674527213399057131606875345083433934446103706309452019115876972432273589838903794946257251289097948986768334611626889116563123474460575179539122045562472807095202198199094558581946136877445617396074115614074243754435499204869180982648652368438702799649017397793425134723808737136211601860128186102056381818354097598477964173900328936171432159878240789776614391395764037760537119096932066998361984288981837003229412030210655743295550388845849737034727532121925706958414074661841981961006129640161487712944415901405467941800198133253378592493365883070459999938375411726563553016862529032210862320550634510679399023341675"};
-   return alpha;
-}
-
-template <class T>
-template<int N>
-inline T constant_plastic<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   using std::cbrt;
-   using std::sqrt;
-   return (cbrt(9-sqrt(T(69))) + cbrt(9+sqrt(T(69))))/cbrt(T(18));
-}
-
-
-template <class T>
-template<int N>
-inline T constant_gauss<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-   using std::sqrt;
-   T a = sqrt(T(2));
-   T g = 1;
-   const T scale = sqrt(std::numeric_limits<T>::epsilon())/512;
-   while (a-g > scale*g)
-   {
-      T anp1 = (a + g)/2;
-      g = sqrt(a*g);
-      a = anp1;
-   }
-
-   return 2/(a + g);
-}
-
-template <class T>
-template<int N>
-inline T constant_dottie<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  // Error analysis: cos(x(1+d)) - x(1+d) = -(sin(x)+1)xd; plug in x = 0.739 gives -1.236d; take d as half an ulp gives the termination criteria we want.
-  using std::cos;
-  using std::abs;
-  using std::sin;
-  T x{".739085133215160641655312087673873404013411758900757464965680635773284654883547594599376106931766531849801246"};
-  T residual = cos(x) - x;
-  do {
-    x += residual/(sin(x)+1);
-    residual = cos(x) - x;
-  } while(abs(residual) > std::numeric_limits<T>::epsilon());
-  return x;
-}
-
-
-template <class T>
-template<int N>
-inline T constant_reciprocal_fibonacci<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  // Wikipedia says Gosper has deviced a faster algorithm for this, but I read the linked paper and couldn't see it!
-  // In any case, k bits per iteration is fine, though it would be better to sum from smallest to largest.
-  // That said, the condition number is unity, so it should be fine.
-  T x0 = 1;
-  T x1 = 1;
-  T sum = 2;
-  T diff = 1;
-  while (diff > std::numeric_limits<T>::epsilon()) {
-    T tmp = x1 + x0;
-    diff = 1/tmp;
-    sum += diff;
-    x0 = x1;
-    x1 = tmp;
-  }
-  return sum;
-}
-
-template <class T>
-template<int N>
-inline T constant_laplace_limit<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))
-{
-  // If x is the exact root, then the approximate root is given by x(1+delta).
-  // Plugging this into the equation for the Laplace limit gives the residual of approximately
-  // 2.6389delta. Take delta as half an epsilon and give some leeway so we don't get caught in an infinite loop,
-  // gives a termination condition as 2eps.
-  using std::abs;
-  using std::exp;
-  using std::sqrt;
-  T x{"0.66274341934918158097474209710925290705623354911502241752039253499097185308651127724965480259895818168"};
-  T tmp = sqrt(1+x*x);
-  T etmp = exp(tmp);
-  T residual = x*exp(tmp) - 1 - tmp;
-  T df = etmp -x/tmp + etmp*x*x/tmp;
-  do {
-    x -= residual/df;
-    tmp = sqrt(1+x*x);
-    etmp = exp(tmp);
-    residual = x*exp(tmp) - 1 - tmp;
-    df = etmp -x/tmp + etmp*x*x/tmp;    
-  } while(abs(residual) > 2*std::numeric_limits<T>::epsilon());
-  return x;
-}
-
-#endif
-
-}
-}
-}
-} // namespaces
-
-#endif // BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED

+ 0 - 345
contrib/restricted/boost/math/include/boost/math/constants/constants.hpp

@@ -1,345 +0,0 @@
-//  Copyright John Maddock 2005-2006, 2011.
-//  Copyright Paul A. Bristow 2006-2011.
-//  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)
-
-#ifndef BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
-#define BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
-
-#include <boost/math/tools/config.hpp>
-#include <boost/math/tools/cxx03_warn.hpp>
-#include <boost/math/policies/policy.hpp>
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/tools/convert_from_string.hpp>
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4127 4701)
-#endif
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-#include <utility>
-#include <type_traits>
-
-#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
-//
-// This is the only way we can avoid
-// warning: non-standard suffix on floating constant [-Wpedantic]
-// when building with -Wall -pedantic.  Neither __extension__
-// nor #pragma diagnostic ignored work :(
-//
-#pragma GCC system_header
-#endif
-
-namespace boost{ namespace math
-{
-  namespace constants
-  {
-    // To permit other calculations at about 100 decimal digits with some UDT,
-    // it is obviously necessary to define constants to this accuracy.
-
-    // However, some compilers do not accept decimal digits strings as long as this.
-    // So the constant is split into two parts, with the 1st containing at least
-    // long double precision, and the 2nd zero if not needed or known.
-    // The 3rd part permits an exponent to be provided if necessary (use zero if none) -
-    // the other two parameters may only contain decimal digits (and sign and decimal point),
-    // and may NOT include an exponent like 1.234E99.
-    // The second digit string is only used if T is a User-Defined Type,
-    // when the constant is converted to a long string literal and lexical_casted to type T.
-    // (This is necessary because you can't use a numeric constant
-    // since even a long double might not have enough digits).
-
-   enum construction_method
-   {
-      construct_from_float = 1,
-      construct_from_double = 2,
-      construct_from_long_double = 3,
-      construct_from_string = 4,
-      construct_from_float128 = 5,
-      // Must be the largest value above:
-      construct_max = construct_from_float128
-   };
-
-   //
-   // Traits class determines how to convert from string based on whether T has a constructor
-   // from const char* or not:
-   //
-   template <int N>
-   struct dummy_size{};
-
-   //
-   // Max number of binary digits in the string representations of our constants:
-   //
-   static constexpr int max_string_digits = (101 * 1000L) / 301L;
-
-   template <typename Real, typename Policy>
-   struct construction_traits
-   {
-   private:
-      using real_precision = typename policies::precision<Real, Policy>::type;
-      using float_precision = typename policies::precision<float, Policy>::type;
-      using double_precision = typename policies::precision<double, Policy>::type;
-      using long_double_precision = typename policies::precision<long double, Policy>::type;
-   public:
-      using type = std::integral_constant<int,
-         (0 == real_precision::value) ? 0 :
-         std::is_convertible<float, Real>::value && (real_precision::value <= float_precision::value)? construct_from_float :
-         std::is_convertible<double, Real>::value && (real_precision::value <= double_precision::value)? construct_from_double :
-         std::is_convertible<long double, Real>::value && (real_precision::value <= long_double_precision::value)? construct_from_long_double :
-#ifdef BOOST_MATH_USE_FLOAT128
-         std::is_convertible<BOOST_MATH_FLOAT128_TYPE, Real>::value && (real_precision::value <= 113) ? construct_from_float128 :
-#endif
-         (real_precision::value <= max_string_digits) ? construct_from_string : real_precision::value
-      >;
-   };
-
-#ifdef BOOST_HAS_THREADS
-#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix) \
-      boost::once_flag f = BOOST_ONCE_INIT;\
-      boost::call_once(f, &BOOST_JOIN(BOOST_JOIN(string_, get_), name)<T>);
-#else
-#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix)
-#endif
-
-   namespace detail{
-
-      template <class Real, class Policy = boost::math::policies::policy<> >
-      struct constant_return
-      {
-         using construct_type = typename construction_traits<Real, Policy>::type;
-         using type = typename std::conditional<
-            (construct_type::value == construct_from_string) || (construct_type::value > construct_max),
-            const Real&, Real>::type;
-      };
-
-      template <typename T, const T& (*F)()>
-      struct constant_initializer
-      {
-         static void force_instantiate()
-         {
-            init.force_instantiate();
-         }
-      private:
-         struct initializer
-         {
-            initializer()
-            {
-               F();
-            }
-            void force_instantiate()const{}
-         };
-         static const initializer init;
-      };
-
-      template <typename T, const T& (*F)()>
-      typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
-
-      template <typename T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
-      struct constant_initializer2
-      {
-         static void force_instantiate()
-         {
-            init.force_instantiate();
-         }
-      private:
-         struct initializer
-         {
-            initializer()
-            {
-               F();
-            }
-            void force_instantiate()const{}
-         };
-         static const initializer init;
-      };
-
-      template <typename T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
-      typename constant_initializer2<T, N, F>::initializer const constant_initializer2<T, N, F>::init;
-
-   }
-
-#ifdef BOOST_MATH_USE_FLOAT128
-#  define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
-   static inline constexpr T get(const std::integral_constant<int, construct_from_float128>&) noexcept\
-   { return BOOST_JOIN(x, Q); }
-#else
-#  define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x)
-#endif
-
-#ifdef BOOST_NO_CXX11_THREAD_LOCAL
-#  define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)       constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_variable_precision>::force_instantiate();
-#else
-#  define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)
-#endif
-
-#define BOOST_DEFINE_MATH_CONSTANT(name, x, y)\
-   namespace detail{\
-   template <typename T> struct BOOST_JOIN(constant_, name){\
-   private:\
-   /* The default implementations come next: */ \
-   static inline const T& get_from_string()\
-   {\
-      static const T result(boost::math::tools::convert_from_string<T>(y));\
-      return result;\
-   }\
-   /* This one is for very high precision that is none the less known at compile time: */ \
-   template <int N> static T compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)));\
-   template <int N> static inline const T& get_from_compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC((std::integral_constant<int, N>)))\
-   {\
-      static const T result = compute<N>();\
-      return result;\
-   }\
-   static inline const T& get_from_variable_precision()\
-   {\
-      static BOOST_MATH_THREAD_LOCAL int digits = 0;\
-      static BOOST_MATH_THREAD_LOCAL T value;\
-      int current_digits = boost::math::tools::digits<T>();\
-      if(digits != current_digits)\
-      {\
-         value = current_digits > max_string_digits ? compute<0>() : T(boost::math::tools::convert_from_string<T>(y));\
-         digits = current_digits; \
-      }\
-      return value;\
-   }\
-   /* public getters come next */\
-   public:\
-   static inline const T& get(const std::integral_constant<int, construct_from_string>&)\
-   {\
-      constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_string >::force_instantiate();\
-      return get_from_string();\
-   }\
-   static inline constexpr T get(const std::integral_constant<int, construct_from_float>) noexcept\
-   { return BOOST_JOIN(x, F); }\
-   static inline constexpr T get(const std::integral_constant<int, construct_from_double>&) noexcept\
-   { return x; }\
-   static inline constexpr T get(const std::integral_constant<int, construct_from_long_double>&) noexcept\
-   { return BOOST_JOIN(x, L); }\
-   BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
-   template <int N> static inline const T& get(const std::integral_constant<int, N>&)\
-   {\
-      constant_initializer2<T, N, & BOOST_JOIN(constant_, name)<T>::template get_from_compute<N> >::force_instantiate();\
-      return get_from_compute<N>(); \
-   }\
-   /* This one is for true arbitrary precision, which may well vary at runtime: */ \
-   static inline T get(const std::integral_constant<int, 0>&)\
-   {\
-      BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)\
-      return get_from_variable_precision(); }\
-   }; /* end of struct */\
-   } /* namespace detail */ \
-   \
-   \
-   /* The actual forwarding function: */ \
-   template <typename T, typename Policy> inline constexpr typename detail::constant_return<T, Policy>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(Policy)) BOOST_MATH_NOEXCEPT(T)\
-   { return detail:: BOOST_JOIN(constant_, name)<T>::get(typename construction_traits<T, Policy>::type()); }\
-   template <typename T> inline constexpr typename detail::constant_return<T>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)\
-   { return name<T, boost::math::policies::policy<> >(); }\
-   \
-   \
-   /* Now the namespace specific versions: */ \
-   } namespace float_constants{ static constexpr float name = BOOST_JOIN(x, F); }\
-   namespace double_constants{ static constexpr double name = x; } \
-   namespace long_double_constants{ static constexpr long double name = BOOST_JOIN(x, L); }\
-   namespace constants{
-
-  BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
-  BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01")
-  BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
-  BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
-  BOOST_DEFINE_MATH_CONSTANT(sixth, 1.666666666666666666666666666666666666e-01, "1.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
-  BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
-  BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00")
-  BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00")
-  BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
-  BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01")
-  BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01")
-  BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
-  BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00")
-  BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00")
-  BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00")
-  BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01")
-  BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00")
-  BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00")
-  BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00")
-  BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01")
-  BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00")
-  BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00")
-  BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00")
-  BOOST_DEFINE_MATH_CONSTANT(log_root_two_pi, 9.189385332046727417803297364056176398e-01, "9.18938533204672741780329736405617639861397473637783412817151540482765695927260397694743298635954197622005646625e-01")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
-  BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
-  BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01")
-  BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01")
-  //BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01")
-  BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01")
-  BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00")
-  BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
-  BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01")
-  BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 1.464591887561523263020142527263790391e+00, "1.46459188756152326302014252726379039173859685562793717435725593713839364979828626614568206782035382089750397002e+00")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 6.827840632552956814670208331581645981e-01, "6.82784063255295681467020833158164598108367515632448804042681583118899226433403918237673501922595519865685577274e-01")
-  BOOST_DEFINE_MATH_CONSTANT(log2_e, 1.44269504088896340735992468100189213742664595415298, "1.44269504088896340735992468100189213742664595415298593413544940693110921918118507988552662289350634449699751830965e+00")
-  BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00")
-  BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01")
-  BOOST_DEFINE_MATH_CONSTANT(exp_minus_one, 3.678794411714423215955237701614608674e-01, "3.67879441171442321595523770161460867445811131031767834507836801697461495744899803357147274345919643746627325277e-01")
-  BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01")
-  BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00")
-  BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
-  BOOST_DEFINE_MATH_CONSTANT(ln_ten, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
-  BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02")
-  BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01")
-  BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01")
-  BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01")
-  BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00")
-  BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00")
-  BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00")
-  BOOST_DEFINE_MATH_CONSTANT(ln_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_ln_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00")
-  BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_euler, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00")
-  BOOST_DEFINE_MATH_CONSTANT(euler_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01")
-  BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
-  BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00")
-  BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01")
-  BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00")
-  BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00")
-  BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00")
-  BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01")
-  BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00")
-  BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01")
-
-  BOOST_DEFINE_MATH_CONSTANT(two_div_pi, 6.366197723675813430755350534900574481e-01, "6.36619772367581343075535053490057448137838582961825794990669376235587190536906140360455211065012343824291370907e-01")
-  BOOST_DEFINE_MATH_CONSTANT(root_two_div_pi, 7.978845608028653558798921198687637369e-01, "7.97884560802865355879892119868763736951717262329869315331851659341315851798603677002504667814613872860605117725e-01")
-  BOOST_DEFINE_MATH_CONSTANT(quarter_pi, 0.785398163397448309615660845819875721049292, "0.785398163397448309615660845819875721049292349843776455243736148076954101571552249657008706335529266995537021628320576661773")
-  BOOST_DEFINE_MATH_CONSTANT(one_div_pi, 0.3183098861837906715377675267450287240689192, "0.31830988618379067153776752674502872406891929148091289749533468811779359526845307018022760553250617191214568545351")
-  BOOST_DEFINE_MATH_CONSTANT(two_div_root_pi, 1.12837916709551257389615890312154517168810125, "1.12837916709551257389615890312154517168810125865799771368817144342128493688298682897348732040421472688605669581272")
-
-#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
-  BOOST_DEFINE_MATH_CONSTANT(first_feigenbaum, 4.66920160910299067185320382046620161725818557747576863274,  "4.6692016091029906718532038204662016172581855774757686327456513430041343302113147371386897440239480138171")
-  BOOST_DEFINE_MATH_CONSTANT(plastic, 1.324717957244746025960908854478097340734404056901733364534, "1.32471795724474602596090885447809734073440405690173336453401505030282785124554759405469934798178728032991")
-  BOOST_DEFINE_MATH_CONSTANT(gauss, 0.834626841674073186281429732799046808993993013490347002449, "0.83462684167407318628142973279904680899399301349034700244982737010368199270952641186969116035127532412906785")
-  BOOST_DEFINE_MATH_CONSTANT(dottie, 0.739085133215160641655312087673873404013411758900757464965, "0.739085133215160641655312087673873404013411758900757464965680635773284654883547594599376106931766531849801246")
-  BOOST_DEFINE_MATH_CONSTANT(reciprocal_fibonacci, 3.35988566624317755317201130291892717968890513, "3.35988566624317755317201130291892717968890513373196848649555381532513031899668338361541621645679008729704")
-  BOOST_DEFINE_MATH_CONSTANT(laplace_limit, 0.662743419349181580974742097109252907056233549115022417, "0.66274341934918158097474209710925290705623354911502241752039253499097185308651127724965480259895818168")
-#endif
-
-template <typename T>
-inline constexpr T tau() {  return two_pi<T>(); }
-
-} // namespace constants
-} // namespace math
-} // namespace boost
-
-//
-// We deliberately include this *after* all the declarations above,
-// that way the calculation routines can call on other constants above:
-//
-#include <boost/math/constants/calculate_constants.hpp>
-
-#endif // BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
-
-

+ 0 - 1057
contrib/restricted/boost/math/include/boost/math/cstdfloat/cstdfloat_cmath.hpp

@@ -1,1057 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2014.
-// Copyright John Maddock 2014.
-// Copyright Paul Bristow 2014.
-// Distributed under 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)
-//
-
-// Implement quadruple-precision <cmath> support.
-
-#ifndef BOOST_MATH_CSTDFLOAT_CMATH_2014_02_15_HPP_
-#define BOOST_MATH_CSTDFLOAT_CMATH_2014_02_15_HPP_
-
-#include <boost/math/cstdfloat/cstdfloat_types.hpp>
-#include <boost/math/cstdfloat/cstdfloat_limits.hpp>
-
-#if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT)
-
-#include <cstdint>
-#include <cmath>
-#include <stdexcept>
-#include <iostream>
-#include <type_traits>
-#include <memory>
-#include <boost/math/tools/assert.hpp>
-#include <boost/math/tools/throw_exception.hpp>
-
-#if defined(_WIN32) && defined(__GNUC__)
-  // Several versions of Mingw and probably cygwin too have broken
-  // libquadmath implementations that segfault as soon as you call
-  // expq or any function that depends on it.
-#define BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS
-#endif
-
-// Here is a helper function used for raising the value of a given
-// floating-point type to the power of n, where n has integral type.
-namespace boost {
-   namespace math {
-      namespace cstdfloat {
-         namespace detail {
-
-            template<class float_type, class integer_type>
-            inline float_type pown(const float_type& x, const integer_type p)
-            {
-               const bool isneg = (x < 0);
-               const bool isnan = (x != x);
-               const bool isinf = ((!isneg) ? bool(+x > (std::numeric_limits<float_type>::max)())
-                  : bool(-x > (std::numeric_limits<float_type>::max)()));
-
-               if (isnan) { return x; }
-
-               if (isinf) { return std::numeric_limits<float_type>::quiet_NaN(); }
-
-               const bool       x_is_neg = (x < 0);
-               const float_type abs_x = (x_is_neg ? -x : x);
-
-               if (p < static_cast<integer_type>(0))
-               {
-                  if (abs_x < (std::numeric_limits<float_type>::min)())
-                  {
-                     return (x_is_neg ? -std::numeric_limits<float_type>::infinity()
-                        : +std::numeric_limits<float_type>::infinity());
-                  }
-                  else
-                  {
-                     return float_type(1) / pown(x, static_cast<integer_type>(-p));
-                  }
-               }
-
-               if (p == static_cast<integer_type>(0))
-               {
-                  return float_type(1);
-               }
-               else
-               {
-                  if (p == static_cast<integer_type>(1)) { return x; }
-
-                  if (abs_x > (std::numeric_limits<float_type>::max)())
-                  {
-                     return (x_is_neg ? -std::numeric_limits<float_type>::infinity()
-                        : +std::numeric_limits<float_type>::infinity());
-                  }
-
-                  if      (p == static_cast<integer_type>(2)) { return  (x * x); }
-                  else if (p == static_cast<integer_type>(3)) { return ((x * x) * x); }
-                  else if (p == static_cast<integer_type>(4)) { const float_type x2 = (x * x); return (x2 * x2); }
-                  else
-                  {
-                     // The variable xn stores the binary powers of x.
-                     float_type result(((p % integer_type(2)) != integer_type(0)) ? x : float_type(1));
-                     float_type xn(x);
-
-                     integer_type p2 = p;
-
-                     while (integer_type(p2 /= 2) != integer_type(0))
-                     {
-                        // Square xn for each binary power.
-                        xn *= xn;
-
-                        const bool has_binary_power = (integer_type(p2 % integer_type(2)) != integer_type(0));
-
-                        if (has_binary_power)
-                        {
-                           // Multiply the result with each binary power contained in the exponent.
-                           result *= xn;
-                        }
-                     }
-
-                     return result;
-                  }
-               }
-            }
-
-         }
-      }
-   }
-} // boost::math::cstdfloat::detail
-
-// We will now define preprocessor symbols representing quadruple-precision <cmath> functions.
-#if defined(__INTEL_COMPILER)
-#define BOOST_CSTDFLOAT_FLOAT128_LDEXP  __ldexpq
-#define BOOST_CSTDFLOAT_FLOAT128_FREXP  __frexpq
-#define BOOST_CSTDFLOAT_FLOAT128_FABS   __fabsq
-#define BOOST_CSTDFLOAT_FLOAT128_FLOOR  __floorq
-#define BOOST_CSTDFLOAT_FLOAT128_CEIL   __ceilq
-#if !defined(BOOST_CSTDFLOAT_FLOAT128_SQRT)
-#define BOOST_CSTDFLOAT_FLOAT128_SQRT   __sqrtq
-#endif
-#define BOOST_CSTDFLOAT_FLOAT128_TRUNC  __truncq
-#define BOOST_CSTDFLOAT_FLOAT128_EXP    __expq
-#define BOOST_CSTDFLOAT_FLOAT128_EXPM1  __expm1q
-#define BOOST_CSTDFLOAT_FLOAT128_POW    __powq
-#define BOOST_CSTDFLOAT_FLOAT128_LOG    __logq
-#define BOOST_CSTDFLOAT_FLOAT128_LOG10  __log10q
-#define BOOST_CSTDFLOAT_FLOAT128_SIN    __sinq
-#define BOOST_CSTDFLOAT_FLOAT128_COS    __cosq
-#define BOOST_CSTDFLOAT_FLOAT128_TAN    __tanq
-#define BOOST_CSTDFLOAT_FLOAT128_ASIN   __asinq
-#define BOOST_CSTDFLOAT_FLOAT128_ACOS   __acosq
-#define BOOST_CSTDFLOAT_FLOAT128_ATAN   __atanq
-#define BOOST_CSTDFLOAT_FLOAT128_SINH   __sinhq
-#define BOOST_CSTDFLOAT_FLOAT128_COSH   __coshq
-#define BOOST_CSTDFLOAT_FLOAT128_TANH   __tanhq
-#define BOOST_CSTDFLOAT_FLOAT128_ASINH  __asinhq
-#define BOOST_CSTDFLOAT_FLOAT128_ACOSH  __acoshq
-#define BOOST_CSTDFLOAT_FLOAT128_ATANH  __atanhq
-#define BOOST_CSTDFLOAT_FLOAT128_FMOD   __fmodq
-#define BOOST_CSTDFLOAT_FLOAT128_ATAN2  __atan2q
-#define BOOST_CSTDFLOAT_FLOAT128_LGAMMA __lgammaq
-#define BOOST_CSTDFLOAT_FLOAT128_TGAMMA __tgammaq
-//   begin more functions
-#define BOOST_CSTDFLOAT_FLOAT128_REMAINDER   __remainderq
-#define BOOST_CSTDFLOAT_FLOAT128_REMQUO      __remquoq
-#define BOOST_CSTDFLOAT_FLOAT128_FMA         __fmaq
-#define BOOST_CSTDFLOAT_FLOAT128_FMAX        __fmaxq
-#define BOOST_CSTDFLOAT_FLOAT128_FMIN        __fminq
-#define BOOST_CSTDFLOAT_FLOAT128_FDIM        __fdimq
-#define BOOST_CSTDFLOAT_FLOAT128_NAN         __nanq
-//#define BOOST_CSTDFLOAT_FLOAT128_EXP2      __exp2q
-#define BOOST_CSTDFLOAT_FLOAT128_LOG2        __log2q
-#define BOOST_CSTDFLOAT_FLOAT128_LOG1P       __log1pq
-#define BOOST_CSTDFLOAT_FLOAT128_CBRT        __cbrtq
-#define BOOST_CSTDFLOAT_FLOAT128_HYPOT       __hypotq
-#define BOOST_CSTDFLOAT_FLOAT128_ERF         __erfq
-#define BOOST_CSTDFLOAT_FLOAT128_ERFC        __erfcq
-#define BOOST_CSTDFLOAT_FLOAT128_LLROUND     __llroundq
-#define BOOST_CSTDFLOAT_FLOAT128_LROUND      __lroundq
-#define BOOST_CSTDFLOAT_FLOAT128_ROUND       __roundq
-#define BOOST_CSTDFLOAT_FLOAT128_NEARBYINT   __nearbyintq
-#define BOOST_CSTDFLOAT_FLOAT128_LLRINT      __llrintq
-#define BOOST_CSTDFLOAT_FLOAT128_LRINT       __lrintq
-#define BOOST_CSTDFLOAT_FLOAT128_RINT        __rintq
-#define BOOST_CSTDFLOAT_FLOAT128_MODF        __modfq
-#define BOOST_CSTDFLOAT_FLOAT128_SCALBLN     __scalblnq
-#define BOOST_CSTDFLOAT_FLOAT128_SCALBN      __scalbnq
-#define BOOST_CSTDFLOAT_FLOAT128_ILOGB       __ilogbq
-#define BOOST_CSTDFLOAT_FLOAT128_LOGB        __logbq
-#define BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER   __nextafterq
-//#define BOOST_CSTDFLOAT_FLOAT128_NEXTTOWARD  __nexttowardq
-#define BOOST_CSTDFLOAT_FLOAT128_COPYSIGN     __copysignq
-#define BOOST_CSTDFLOAT_FLOAT128_SIGNBIT      __signbitq
-//#define BOOST_CSTDFLOAT_FLOAT128_FPCLASSIFY __fpclassifyq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISFINITE   __isfiniteq
-#define BOOST_CSTDFLOAT_FLOAT128_ISINF        __isinfq
-#define BOOST_CSTDFLOAT_FLOAT128_ISNAN        __isnanq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISNORMAL   __isnormalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISGREATER  __isgreaterq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISGREATEREQUAL __isgreaterequalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESS         __islessq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESSEQUAL    __islessequalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESSGREATER  __islessgreaterq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISUNORDERED    __isunorderedq
-//   end more functions
-#elif defined(__GNUC__)
-#define BOOST_CSTDFLOAT_FLOAT128_LDEXP  ldexpq
-#define BOOST_CSTDFLOAT_FLOAT128_FREXP  frexpq
-#define BOOST_CSTDFLOAT_FLOAT128_FABS   fabsq
-#define BOOST_CSTDFLOAT_FLOAT128_FLOOR  floorq
-#define BOOST_CSTDFLOAT_FLOAT128_CEIL   ceilq
-#if !defined(BOOST_CSTDFLOAT_FLOAT128_SQRT)
-#define BOOST_CSTDFLOAT_FLOAT128_SQRT   sqrtq
-#endif
-#define BOOST_CSTDFLOAT_FLOAT128_TRUNC  truncq
-#define BOOST_CSTDFLOAT_FLOAT128_POW    powq
-#define BOOST_CSTDFLOAT_FLOAT128_LOG    logq
-#define BOOST_CSTDFLOAT_FLOAT128_LOG10  log10q
-#define BOOST_CSTDFLOAT_FLOAT128_SIN    sinq
-#define BOOST_CSTDFLOAT_FLOAT128_COS    cosq
-#define BOOST_CSTDFLOAT_FLOAT128_TAN    tanq
-#define BOOST_CSTDFLOAT_FLOAT128_ASIN   asinq
-#define BOOST_CSTDFLOAT_FLOAT128_ACOS   acosq
-#define BOOST_CSTDFLOAT_FLOAT128_ATAN   atanq
-#define BOOST_CSTDFLOAT_FLOAT128_FMOD   fmodq
-#define BOOST_CSTDFLOAT_FLOAT128_ATAN2  atan2q
-#define BOOST_CSTDFLOAT_FLOAT128_LGAMMA lgammaq
-#if !defined(BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS)
-#define BOOST_CSTDFLOAT_FLOAT128_EXP    expq
-#define BOOST_CSTDFLOAT_FLOAT128_EXPM1  expm1q
-#define BOOST_CSTDFLOAT_FLOAT128_SINH   sinhq
-#define BOOST_CSTDFLOAT_FLOAT128_COSH   coshq
-#define BOOST_CSTDFLOAT_FLOAT128_TANH   tanhq
-#define BOOST_CSTDFLOAT_FLOAT128_ASINH  asinhq
-#define BOOST_CSTDFLOAT_FLOAT128_ACOSH  acoshq
-#define BOOST_CSTDFLOAT_FLOAT128_ATANH  atanhq
-#define BOOST_CSTDFLOAT_FLOAT128_TGAMMA tgammaq
-#else // BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS
-#define BOOST_CSTDFLOAT_FLOAT128_EXP    expq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_SINH   sinhq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_COSH   coshq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_TANH   tanhq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_ASINH  asinhq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_ACOSH  acoshq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_ATANH  atanhq_patch
-#define BOOST_CSTDFLOAT_FLOAT128_TGAMMA tgammaq_patch
-#endif // BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS
-//   begin more functions
-#define BOOST_CSTDFLOAT_FLOAT128_REMAINDER   remainderq
-#define BOOST_CSTDFLOAT_FLOAT128_REMQUO      remquoq
-#define BOOST_CSTDFLOAT_FLOAT128_FMA         fmaq
-#define BOOST_CSTDFLOAT_FLOAT128_FMAX        fmaxq
-#define BOOST_CSTDFLOAT_FLOAT128_FMIN        fminq
-#define BOOST_CSTDFLOAT_FLOAT128_FDIM        fdimq
-#define BOOST_CSTDFLOAT_FLOAT128_NAN         nanq
-//#define BOOST_CSTDFLOAT_FLOAT128_EXP2      exp2q
-#define BOOST_CSTDFLOAT_FLOAT128_LOG2        log2q
-#define BOOST_CSTDFLOAT_FLOAT128_LOG1P       log1pq
-#define BOOST_CSTDFLOAT_FLOAT128_CBRT        cbrtq
-#define BOOST_CSTDFLOAT_FLOAT128_HYPOT       hypotq
-#define BOOST_CSTDFLOAT_FLOAT128_ERF         erfq
-#define BOOST_CSTDFLOAT_FLOAT128_ERFC        erfcq
-#define BOOST_CSTDFLOAT_FLOAT128_LLROUND     llroundq
-#define BOOST_CSTDFLOAT_FLOAT128_LROUND      lroundq
-#define BOOST_CSTDFLOAT_FLOAT128_ROUND       roundq
-#define BOOST_CSTDFLOAT_FLOAT128_NEARBYINT   nearbyintq
-#define BOOST_CSTDFLOAT_FLOAT128_LLRINT      llrintq
-#define BOOST_CSTDFLOAT_FLOAT128_LRINT       lrintq
-#define BOOST_CSTDFLOAT_FLOAT128_RINT        rintq
-#define BOOST_CSTDFLOAT_FLOAT128_MODF        modfq
-#define BOOST_CSTDFLOAT_FLOAT128_SCALBLN     scalblnq
-#define BOOST_CSTDFLOAT_FLOAT128_SCALBN      scalbnq
-#define BOOST_CSTDFLOAT_FLOAT128_ILOGB       ilogbq
-#define BOOST_CSTDFLOAT_FLOAT128_LOGB        logbq
-#define BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER   nextafterq
-//#define BOOST_CSTDFLOAT_FLOAT128_NEXTTOWARD nexttowardq
-#define BOOST_CSTDFLOAT_FLOAT128_COPYSIGN    copysignq
-#define BOOST_CSTDFLOAT_FLOAT128_SIGNBIT     signbitq
-//#define BOOST_CSTDFLOAT_FLOAT128_FPCLASSIFY fpclassifyq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISFINITE   isfiniteq
-#define BOOST_CSTDFLOAT_FLOAT128_ISINF        isinfq
-#define BOOST_CSTDFLOAT_FLOAT128_ISNAN        isnanq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISNORMAL   isnormalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISGREATER  isgreaterq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISGREATEREQUAL isgreaterequalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESS         islessq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESSEQUAL    islessequalq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISLESSGREATER  islessgreaterq
-//#define BOOST_CSTDFLOAT_FLOAT128_ISUNORDERED    isunorderedq
-//   end more functions
-#endif
-
-// Implement quadruple-precision <cmath> functions in the namespace
-// boost::math::cstdfloat::detail. Subsequently inject these into the
-// std namespace via *using* directive.
-
-// Begin with some forward function declarations. Also implement patches
-// for compilers that have broken float128 exponential functions.
-
-extern "C" int quadmath_snprintf(char*, std::size_t, const char*, ...) throw();
-
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_LDEXP(boost::math::cstdfloat::detail::float_internal128_t, int)  noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_FREXP(boost::math::cstdfloat::detail::float_internal128_t, int*) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_FABS(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_FLOOR(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_CEIL(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SQRT(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TRUNC(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_POW(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_LOG(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_LOG10(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SIN(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_COS(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TAN(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ASIN(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ACOS(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ATAN(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_FMOD(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ATAN2(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_LGAMMA(boost::math::cstdfloat::detail::float_internal128_t) noexcept;
-
-//   begin more functions
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_REMAINDER(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_REMQUO(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t, int*) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_FMA(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_FMAX(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_FMIN(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_FDIM(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_NAN(const char*) throw();
-//extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_EXP2         (boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_LOG2(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_LOG1P(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_CBRT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_HYPOT(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_ERF(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_ERFC(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" long long int                                BOOST_CSTDFLOAT_FLOAT128_LLROUND(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" long int                                   BOOST_CSTDFLOAT_FLOAT128_LROUND(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_ROUND(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_NEARBYINT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" long long int                                BOOST_CSTDFLOAT_FLOAT128_LLRINT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" long int                                   BOOST_CSTDFLOAT_FLOAT128_LRINT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_RINT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_MODF(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t*) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_SCALBLN(boost::math::cstdfloat::detail::float_internal128_t, long int) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_SCALBN(boost::math::cstdfloat::detail::float_internal128_t, int) throw();
-extern "C" int                                      BOOST_CSTDFLOAT_FLOAT128_ILOGB(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_LOGB(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_NEXTTOWARD   (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_COPYSIGN(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" int                                                  BOOST_CSTDFLOAT_FLOAT128_SIGNBIT(boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_FPCLASSIFY   (boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISFINITE      (boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" int                                                  BOOST_CSTDFLOAT_FLOAT128_ISINF(boost::math::cstdfloat::detail::float_internal128_t) throw();
-extern "C" int                                                  BOOST_CSTDFLOAT_FLOAT128_ISNAN(boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" boost::math::cstdfloat::detail::float_internal128_t  BOOST_CSTDFLOAT_FLOAT128_ISNORMAL   (boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISGREATER   (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISGREATEREQUAL(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISLESS      (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISLESSEQUAL   (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISLESSGREATER(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
-//extern "C" int                                                BOOST_CSTDFLOAT_FLOAT128_ISUNORDERED   (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) throw();
- //   end more functions
-
-#if !defined(BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS)
-
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_EXP(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_EXPM1(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SINH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_COSH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TANH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ASINH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ACOSH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ATANH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
-extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TGAMMA(boost::math::cstdfloat::detail::float_internal128_t x) noexcept;
- 
-#else // BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS
-
-// Forward declaration of the patched exponent function, exp(x).
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_EXP(boost::math::cstdfloat::detail::float_internal128_t x);
-
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_EXPM1(boost::math::cstdfloat::detail::float_internal128_t x)
-{
-   // Compute exp(x) - 1 for x small.
-
-   // Use an order-12 Pade approximation of the exponential function.
-   // PadeApproximant[Exp[x] - 1, {x, 0, 12, 12}].
-
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-
-   float_type sum;
-
-   if (x > BOOST_FLOAT128_C(0.693147180559945309417232121458176568075500134360255))
-   {
-      sum = ::BOOST_CSTDFLOAT_FLOAT128_EXP(x) - float_type(1);
-   }
-   else
-   {
-      const float_type x2 = (x * x);
-
-      const float_type top = (((((  float_type(BOOST_FLOAT128_C(2.4087176110456818621091195109360728010934088788572E-13))  * x2
-                                  + float_type(BOOST_FLOAT128_C(9.2735628025258751691201101171038802842096241836000E-10))) * x2
-                                  + float_type(BOOST_FLOAT128_C(9.0806726962333369656024118266681195742980640005812E-07))) * x2
-                                  + float_type(BOOST_FLOAT128_C(3.1055900621118012422360248447204968944099378881988E-04))) * x2
-                                  + float_type(BOOST_FLOAT128_C(3.6231884057971014492753623188405797101449275362319E-02))) * x2
-                                  + float_type(BOOST_FLOAT128_C(1.00000000000000000000000000000000000000000000000000000)))
-                                  ;
-
-      const float_type bot = ((((((((((((  float_type(BOOST_FLOAT128_C(+7.7202487533515444298369215094104897470942592271063E-16))  * x
-                                         + float_type(BOOST_FLOAT128_C(-1.2043588055228409310545597554680364005467044394286E-13))) * x
-                                         + float_type(BOOST_FLOAT128_C(+9.2735628025258751691201101171038802842096241836000E-12))) * x
-                                         + float_type(BOOST_FLOAT128_C(-4.6367814012629375845600550585519401421048120918000E-10))) * x
-                                         + float_type(BOOST_FLOAT128_C(+1.6692413044546575304416198210786984511577323530480E-08))) * x
-                                         + float_type(BOOST_FLOAT128_C(-4.5403363481166684828012059133340597871490320002906E-07))) * x
-                                         + float_type(BOOST_FLOAT128_C(+9.5347063310450038138825324180015255530129672006102E-06))) * x
-                                         + float_type(BOOST_FLOAT128_C(-1.5527950310559006211180124223602484472049689440994E-04))) * x
-                                         + float_type(BOOST_FLOAT128_C(+1.9409937888198757763975155279503105590062111801242E-03))) * x
-                                         + float_type(BOOST_FLOAT128_C(-1.8115942028985507246376811594202898550724637681159E-02))) * x
-                                         + float_type(BOOST_FLOAT128_C(+1.1956521739130434782608695652173913043478260869565E-01))) * x
-                                         + float_type(BOOST_FLOAT128_C(-0.50000000000000000000000000000000000000000000000000000))) * x
-                                         + float_type(BOOST_FLOAT128_C(+1.00000000000000000000000000000000000000000000000000000)))
-                                         ;
-
-      sum = (x * top) / bot;
-   }
-
-   return sum;
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_EXP(boost::math::cstdfloat::detail::float_internal128_t x)
-{
-   // Patch the expq() function for a subset of broken GCC compilers
-   // like GCC 4.7, 4.8 on MinGW.
-
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-
-   // Scale the argument x to the range (-ln2 < x < ln2).
-   constexpr float_type one_over_ln2 = float_type(BOOST_FLOAT128_C(1.44269504088896340735992468100189213742664595415299));
-   const float_type x_over_ln2 = x * one_over_ln2;
-
-   int n;
-
-   if (x != x)
-   {
-      // The argument is NaN.
-      return std::numeric_limits<float_type>::quiet_NaN();
-   }
-   else if (::BOOST_CSTDFLOAT_FLOAT128_FABS(x) > BOOST_FLOAT128_C(+0.693147180559945309417232121458176568075500134360255))
-   {
-      // The absolute value of the argument exceeds ln2.
-      n = static_cast<int>(::BOOST_CSTDFLOAT_FLOAT128_FLOOR(x_over_ln2));
-   }
-   else if (::BOOST_CSTDFLOAT_FLOAT128_FABS(x) < BOOST_FLOAT128_C(+0.693147180559945309417232121458176568075500134360255))
-   {
-      // The absolute value of the argument is less than ln2.
-      n = 0;
-   }
-   else
-   {
-      // The absolute value of the argument is exactly equal to ln2 (in the sense of floating-point equality).
-      return float_type(2);
-   }
-
-   // Check if the argument is very near an integer.
-   const float_type floor_of_x = ::BOOST_CSTDFLOAT_FLOAT128_FLOOR(x);
-
-   if (::BOOST_CSTDFLOAT_FLOAT128_FABS(x - floor_of_x) < float_type(BOOST_CSTDFLOAT_FLOAT128_EPS))
-   {
-      // Return e^n for arguments very near an integer.
-      return boost::math::cstdfloat::detail::pown(BOOST_FLOAT128_C(2.71828182845904523536028747135266249775724709369996), static_cast<std::int_fast32_t>(floor_of_x));
-   }
-
-   // Compute the scaled argument alpha.
-   const float_type alpha = x - (n * BOOST_FLOAT128_C(0.693147180559945309417232121458176568075500134360255));
-
-   // Compute the polynomial approximation of expm1(alpha) and add to it
-   // in order to obtain the scaled result.
-   const float_type scaled_result = ::BOOST_CSTDFLOAT_FLOAT128_EXPM1(alpha) + float_type(1);
-
-   // Rescale the result and return it.
-   return scaled_result * boost::math::cstdfloat::detail::pown(float_type(2), n);
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SINH(boost::math::cstdfloat::detail::float_internal128_t x)
-{
-   // Patch the sinhq() function for a subset of broken GCC compilers
-   // like GCC 4.7, 4.8 on MinGW.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-
-   // Here, we use the following:
-   // Set: ex  = exp(x)
-   // Set: em1 = expm1(x)
-   // Then
-   // sinh(x) = (ex - 1/ex) / 2         ; for |x| >= 1
-   // sinh(x) = (2em1 + em1^2) / (2ex)  ; for |x| < 1
-
-   const float_type ex = ::BOOST_CSTDFLOAT_FLOAT128_EXP(x);
-
-   if (::BOOST_CSTDFLOAT_FLOAT128_FABS(x) < float_type(+1))
-   {
-      const float_type em1 = ::BOOST_CSTDFLOAT_FLOAT128_EXPM1(x);
-
-      return ((em1 * 2) + (em1 * em1)) / (ex * 2);
-   }
-   else
-   {
-      return (ex - (float_type(1) / ex)) / 2;
-   }
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_COSH(boost::math::cstdfloat::detail::float_internal128_t x)
-{
-   // Patch the coshq() function for a subset of broken GCC compilers
-   // like GCC 4.7, 4.8 on MinGW.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-   const float_type ex = ::BOOST_CSTDFLOAT_FLOAT128_EXP(x);
-   return (ex + (float_type(1) / ex)) / 2;
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TANH(boost::math::cstdfloat::detail::float_internal128_t x)
-{
-   // Patch the tanhq() function for a subset of broken GCC compilers
-   // like GCC 4.7, 4.8 on MinGW.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-   const float_type ex_plus = ::BOOST_CSTDFLOAT_FLOAT128_EXP(x);
-   const float_type ex_minus = (float_type(1) / ex_plus);
-   return (ex_plus - ex_minus) / (ex_plus + ex_minus);
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ASINH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept
-{
-   // Patch the asinh() function since quadmath does not have it.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-   return ::BOOST_CSTDFLOAT_FLOAT128_LOG(x + ::BOOST_CSTDFLOAT_FLOAT128_SQRT((x * x) + float_type(1)));
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ACOSH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept
-{
-   // Patch the acosh() function since quadmath does not have it.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-   const float_type zp(x + float_type(1));
-   const float_type zm(x - float_type(1));
-
-   return ::BOOST_CSTDFLOAT_FLOAT128_LOG(x + (zp * ::BOOST_CSTDFLOAT_FLOAT128_SQRT(zm / zp)));
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ATANH(boost::math::cstdfloat::detail::float_internal128_t x) noexcept
-{
-   // Patch the atanh() function since quadmath does not have it.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-   return (::BOOST_CSTDFLOAT_FLOAT128_LOG(float_type(1) + x)
-      - ::BOOST_CSTDFLOAT_FLOAT128_LOG(float_type(1) - x)) / 2;
-}
-inline boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_TGAMMA(boost::math::cstdfloat::detail::float_internal128_t x) noexcept
-{
-   // Patch the tgammaq() function for a subset of broken GCC compilers
-   // like GCC 4.7, 4.8 on MinGW.
-   typedef boost::math::cstdfloat::detail::float_internal128_t float_type;
-
-   if (x > float_type(0))
-   {
-      return ::BOOST_CSTDFLOAT_FLOAT128_EXP(::BOOST_CSTDFLOAT_FLOAT128_LGAMMA(x));
-   }
-   else if (x < float_type(0))
-   {
-      // For x < 0, compute tgamma(-x) and use the reflection formula.
-      const float_type positive_x = -x;
-      float_type gamma_value = ::BOOST_CSTDFLOAT_FLOAT128_TGAMMA(positive_x);
-      const float_type floor_of_positive_x = ::BOOST_CSTDFLOAT_FLOAT128_FLOOR(positive_x);
-
-      // Take the reflection checks (slightly adapted) from <boost/math/gamma.hpp>.
-      const bool floor_of_z_is_equal_to_z = (positive_x == ::BOOST_CSTDFLOAT_FLOAT128_FLOOR(positive_x));
-
-      constexpr float_type my_pi = BOOST_FLOAT128_C(3.14159265358979323846264338327950288419716939937511);
-
-      if (floor_of_z_is_equal_to_z)
-      {
-         const bool is_odd = ((std::int32_t(floor_of_positive_x) % std::int32_t(2)) != std::int32_t(0));
-
-         return (is_odd ? -std::numeric_limits<float_type>::infinity()
-            : +std::numeric_limits<float_type>::infinity());
-      }
-
-      const float_type sinpx_value = x * ::BOOST_CSTDFLOAT_FLOAT128_SIN(my_pi * x);
-
-      gamma_value *= sinpx_value;
-
-      const bool result_is_too_large_to_represent = ((::BOOST_CSTDFLOAT_FLOAT128_FABS(gamma_value) < float_type(1))
-         && (((std::numeric_limits<float_type>::max)() * ::BOOST_CSTDFLOAT_FLOAT128_FABS(gamma_value)) < my_pi));
-
-      if (result_is_too_large_to_represent)
-      {
-         const bool is_odd = ((std::int32_t(floor_of_positive_x) % std::int32_t(2)) != std::int32_t(0));
-
-         return (is_odd ? -std::numeric_limits<float_type>::infinity()
-            : +std::numeric_limits<float_type>::infinity());
-      }
-
-      gamma_value = -my_pi / gamma_value;
-
-      if ((gamma_value > float_type(0)) || (gamma_value < float_type(0)))
-      {
-         return gamma_value;
-      }
-      else
-      {
-         // The value of gamma is too small to represent. Return 0.0 here.
-         return float_type(0);
-      }
-   }
-   else
-   {
-      // Gamma of zero is complex infinity. Return NaN here.
-      return std::numeric_limits<float_type>::quiet_NaN();
-   }
-}
-#endif // BOOST_CSTDFLOAT_BROKEN_FLOAT128_MATH_FUNCTIONS
-
-// Define the quadruple-precision <cmath> functions in the namespace boost::math::cstdfloat::detail.
-
-namespace boost {
-   namespace math {
-      namespace cstdfloat {
-         namespace detail {
-            inline   boost::math::cstdfloat::detail::float_internal128_t ldexp(boost::math::cstdfloat::detail::float_internal128_t x, int n) { return ::BOOST_CSTDFLOAT_FLOAT128_LDEXP(x, n); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t frexp(boost::math::cstdfloat::detail::float_internal128_t x, int* pn) { return ::BOOST_CSTDFLOAT_FLOAT128_FREXP(x, pn); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t fabs(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_FABS(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t abs(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_FABS(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t floor(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_FLOOR(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t ceil(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_CEIL(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t sqrt(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_SQRT(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t trunc(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_TRUNC(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t exp(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_EXP(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t expm1(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_EXPM1(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t pow(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t a) { return ::BOOST_CSTDFLOAT_FLOAT128_POW(x, a); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t pow(boost::math::cstdfloat::detail::float_internal128_t x, int a) { return ::BOOST_CSTDFLOAT_FLOAT128_POW(x, boost::math::cstdfloat::detail::float_internal128_t(a)); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t log(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LOG(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t log10(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LOG10(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t sin(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_SIN(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t cos(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_COS(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t tan(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_TAN(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t asin(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ASIN(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t acos(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ACOS(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t atan(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ATAN(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t sinh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_SINH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t cosh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_COSH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t tanh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_TANH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t asinh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ASINH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t acosh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ACOSH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t atanh(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ATANH(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t fmod(boost::math::cstdfloat::detail::float_internal128_t a, boost::math::cstdfloat::detail::float_internal128_t b) { return ::BOOST_CSTDFLOAT_FLOAT128_FMOD(a, b); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t atan2(boost::math::cstdfloat::detail::float_internal128_t y, boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ATAN2(y, x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t lgamma(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LGAMMA(x); }
-            inline   boost::math::cstdfloat::detail::float_internal128_t tgamma(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_TGAMMA(x); }
-            //   begin more functions
-            inline boost::math::cstdfloat::detail::float_internal128_t  remainder(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_REMAINDER(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  remquo(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y, int* z) { return ::BOOST_CSTDFLOAT_FLOAT128_REMQUO(x, y, z); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  fma(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y, boost::math::cstdfloat::detail::float_internal128_t z) { return BOOST_CSTDFLOAT_FLOAT128_FMA(x, y, z); }
-
-            inline boost::math::cstdfloat::detail::float_internal128_t  fmax(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMAX(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               fmax(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMAX(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               fmax(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMAX(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  fmin(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMIN(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               fmin(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMIN(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               fmin(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_FMIN(x, y); }
-
-            inline boost::math::cstdfloat::detail::float_internal128_t  fdim(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_FDIM(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  nanq(const char* x) { return ::BOOST_CSTDFLOAT_FLOAT128_NAN(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  exp2(boost::math::cstdfloat::detail::float_internal128_t x)
-            {
-               return ::BOOST_CSTDFLOAT_FLOAT128_POW(boost::math::cstdfloat::detail::float_internal128_t(2), x);
-            }
-            inline boost::math::cstdfloat::detail::float_internal128_t  log2(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LOG2(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  log1p(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LOG1P(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  cbrt(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_CBRT(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  hypot(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y, boost::math::cstdfloat::detail::float_internal128_t z) { return ::BOOST_CSTDFLOAT_FLOAT128_SQRT(x*x + y * y + z * z); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  hypot(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_HYPOT(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               hypot(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return ::BOOST_CSTDFLOAT_FLOAT128_HYPOT(x, y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               hypot(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_HYPOT(x, y); }
-
-
-            inline boost::math::cstdfloat::detail::float_internal128_t  erf(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ERF(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  erfc(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ERFC(x); }
-            inline long long int                                        llround(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LLROUND(x); }
-            inline long int                                             lround(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LROUND(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  round(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ROUND(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  nearbyint(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_NEARBYINT(x); }
-            inline long long int                                        llrint(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LLRINT(x); }
-            inline long int                                             lrint(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LRINT(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  rint(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_RINT(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  modf(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t* y) { return ::BOOST_CSTDFLOAT_FLOAT128_MODF(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  scalbln(boost::math::cstdfloat::detail::float_internal128_t x, long int y) { return ::BOOST_CSTDFLOAT_FLOAT128_SCALBLN(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  scalbn(boost::math::cstdfloat::detail::float_internal128_t x, int y) { return ::BOOST_CSTDFLOAT_FLOAT128_SCALBN(x, y); }
-            inline int                                                  ilogb(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ILOGB(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  logb(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_LOGB(x); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  nextafter(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER(x, y); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  nexttoward(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return -(::BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER(-x, -y)); }
-            inline boost::math::cstdfloat::detail::float_internal128_t  copysign   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_COPYSIGN(x, y); }
-            inline bool                                                 signbit   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_SIGNBIT(x); }
-            inline int                                                  fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x)
-            {
-               if (::BOOST_CSTDFLOAT_FLOAT128_ISNAN(x))
-                  return FP_NAN;
-               else if (::BOOST_CSTDFLOAT_FLOAT128_ISINF(x))
-                  return FP_INFINITE;
-               else if (x == BOOST_FLOAT128_C(0.0))
-                  return FP_ZERO;
-
-               if (::BOOST_CSTDFLOAT_FLOAT128_FABS(x) < BOOST_CSTDFLOAT_FLOAT128_MIN)
-                  return FP_SUBNORMAL;
-               else
-                  return FP_NORMAL;
-            }
-            inline bool                                      isfinite   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x)
-            {
-               return !::BOOST_CSTDFLOAT_FLOAT128_ISNAN(x) && !::BOOST_CSTDFLOAT_FLOAT128_ISINF(x);
-            }
-            inline bool                                      isinf      BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ISINF(x); }
-            inline bool                                      isnan      BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x) { return ::BOOST_CSTDFLOAT_FLOAT128_ISNAN(x); }
-            inline bool                                      isnormal   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x) { return boost::math::cstdfloat::detail::fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(x) == FP_NORMAL; }
-            inline bool                                      isgreater      BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y)
-            {
-               if (isnan BOOST_PREVENT_MACRO_SUBSTITUTION(x) || isnan BOOST_PREVENT_MACRO_SUBSTITUTION(y))
-                  return false;
-               return x > y;
-            }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isgreater BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return isgreater BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isgreater BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return isgreater BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-            inline bool                                      isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y)
-            {
-               if (isnan BOOST_PREVENT_MACRO_SUBSTITUTION(x) || isnan BOOST_PREVENT_MACRO_SUBSTITUTION(y))
-                  return false;
-               return x >= y;
-            }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-            inline bool                                      isless      BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y)
-            {
-               if (isnan BOOST_PREVENT_MACRO_SUBSTITUTION(x) || isnan BOOST_PREVENT_MACRO_SUBSTITUTION(y))
-                  return false;
-               return x < y;
-            }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isless BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return isless BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isless BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return isless BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-
-            inline bool                                      islessequal   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y)
-            {
-               if (isnan BOOST_PREVENT_MACRO_SUBSTITUTION(x) || isnan BOOST_PREVENT_MACRO_SUBSTITUTION(y))
-                  return false;
-               return x <= y;
-            }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               islessequal BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return islessequal BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               islessequal BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return islessequal BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-
-            inline bool                                      islessgreater   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y)
-            {
-               if (isnan BOOST_PREVENT_MACRO_SUBSTITUTION(x) || isnan BOOST_PREVENT_MACRO_SUBSTITUTION(y))
-                  return false;
-               return (x < y) || (x > y);
-            }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-
-            inline bool                                      isunordered   BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, boost::math::cstdfloat::detail::float_internal128_t y) { return ::BOOST_CSTDFLOAT_FLOAT128_ISNAN(x) || ::BOOST_CSTDFLOAT_FLOAT128_ISNAN(y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isunordered BOOST_PREVENT_MACRO_SUBSTITUTION(boost::math::cstdfloat::detail::float_internal128_t x, T y) { return isunordered BOOST_PREVENT_MACRO_SUBSTITUTION(x, (boost::math::cstdfloat::detail::float_internal128_t)y); }
-            template <class T>
-            inline typename std::enable_if<
-               std::is_convertible<T, boost::math::cstdfloat::detail::float_internal128_t>::value
-               && !std::is_same<T, boost::math::cstdfloat::detail::float_internal128_t>::value, boost::math::cstdfloat::detail::float_internal128_t>::type
-               isunordered BOOST_PREVENT_MACRO_SUBSTITUTION(T x, boost::math::cstdfloat::detail::float_internal128_t y) { return isunordered BOOST_PREVENT_MACRO_SUBSTITUTION((boost::math::cstdfloat::detail::float_internal128_t)x, y); }
-
-
-            //   end more functions
-         }
-      }
-   }
-} // boost::math::cstdfloat::detail
-
-// We will now inject the quadruple-precision <cmath> functions
-// into the std namespace. This is done via *using* directive.
-namespace std
-{
-   using boost::math::cstdfloat::detail::ldexp;
-   using boost::math::cstdfloat::detail::frexp;
-   using boost::math::cstdfloat::detail::fabs;
-
-#if !(defined(_GLIBCXX_USE_FLOAT128) && defined(__GNUC__) && (__GNUC__ >= 7))
-#if (defined(__clang__) && !(!defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128))) || (__GNUC__ <= 6 && !defined(__clang__)) 
-   // workaround for clang using libstdc++ and old GCC
-   using boost::math::cstdfloat::detail::abs;
-#endif
-#endif
-
-   using boost::math::cstdfloat::detail::floor;
-   using boost::math::cstdfloat::detail::ceil;
-   using boost::math::cstdfloat::detail::sqrt;
-   using boost::math::cstdfloat::detail::trunc;
-   using boost::math::cstdfloat::detail::exp;
-   using boost::math::cstdfloat::detail::expm1;
-   using boost::math::cstdfloat::detail::pow;
-   using boost::math::cstdfloat::detail::log;
-   using boost::math::cstdfloat::detail::log10;
-   using boost::math::cstdfloat::detail::sin;
-   using boost::math::cstdfloat::detail::cos;
-   using boost::math::cstdfloat::detail::tan;
-   using boost::math::cstdfloat::detail::asin;
-   using boost::math::cstdfloat::detail::acos;
-   using boost::math::cstdfloat::detail::atan;
-   using boost::math::cstdfloat::detail::sinh;
-   using boost::math::cstdfloat::detail::cosh;
-   using boost::math::cstdfloat::detail::tanh;
-   using boost::math::cstdfloat::detail::asinh;
-   using boost::math::cstdfloat::detail::acosh;
-   using boost::math::cstdfloat::detail::atanh;
-   using boost::math::cstdfloat::detail::fmod;
-   using boost::math::cstdfloat::detail::atan2;
-   using boost::math::cstdfloat::detail::lgamma;
-   using boost::math::cstdfloat::detail::tgamma;
-
-   //   begin more functions
-   using boost::math::cstdfloat::detail::remainder;
-   using boost::math::cstdfloat::detail::remquo;
-   using boost::math::cstdfloat::detail::fma;
-   using boost::math::cstdfloat::detail::fmax;
-   using boost::math::cstdfloat::detail::fmin;
-   using boost::math::cstdfloat::detail::fdim;
-   using boost::math::cstdfloat::detail::nanq;
-   using boost::math::cstdfloat::detail::exp2;
-   using boost::math::cstdfloat::detail::log2;
-   using boost::math::cstdfloat::detail::log1p;
-   using boost::math::cstdfloat::detail::cbrt;
-   using boost::math::cstdfloat::detail::hypot;
-   using boost::math::cstdfloat::detail::erf;
-   using boost::math::cstdfloat::detail::erfc;
-   using boost::math::cstdfloat::detail::llround;
-   using boost::math::cstdfloat::detail::lround;
-   using boost::math::cstdfloat::detail::round;
-   using boost::math::cstdfloat::detail::nearbyint;
-   using boost::math::cstdfloat::detail::llrint;
-   using boost::math::cstdfloat::detail::lrint;
-   using boost::math::cstdfloat::detail::rint;
-   using boost::math::cstdfloat::detail::modf;
-   using boost::math::cstdfloat::detail::scalbln;
-   using boost::math::cstdfloat::detail::scalbn;
-   using boost::math::cstdfloat::detail::ilogb;
-   using boost::math::cstdfloat::detail::logb;
-   using boost::math::cstdfloat::detail::nextafter;
-   using boost::math::cstdfloat::detail::nexttoward;
-   using boost::math::cstdfloat::detail::copysign;
-   using boost::math::cstdfloat::detail::signbit;
-   using boost::math::cstdfloat::detail::fpclassify;
-   using boost::math::cstdfloat::detail::isfinite;
-   using boost::math::cstdfloat::detail::isinf;
-   using boost::math::cstdfloat::detail::isnan;
-   using boost::math::cstdfloat::detail::isnormal;
-   using boost::math::cstdfloat::detail::isgreater;
-   using boost::math::cstdfloat::detail::isgreaterequal;
-   using boost::math::cstdfloat::detail::isless;
-   using boost::math::cstdfloat::detail::islessequal;
-   using boost::math::cstdfloat::detail::islessgreater;
-   using boost::math::cstdfloat::detail::isunordered;
-   //   end more functions
-
-   //
-   // Very basic iostream operator:
-   //
-   inline std::ostream& operator << (std::ostream& os, __float128 m_value)
-   {
-      std::streamsize digits = os.precision();
-      std::ios_base::fmtflags f = os.flags();
-      std::string s;
-
-      char buf[100];
-      std::unique_ptr<char[]> buf2;
-      std::string format = "%";
-      if (f & std::ios_base::showpos)
-         format += "+";
-      if (f & std::ios_base::showpoint)
-         format += "#";
-      format += ".*";
-      if (digits == 0)
-         digits = 36;
-      format += "Q";
-      if (f & std::ios_base::scientific)
-         format += "e";
-      else if (f & std::ios_base::fixed)
-         format += "f";
-      else
-         format += "g";
-
-      int v = quadmath_snprintf(buf, 100, format.c_str(), digits, m_value);
-
-      if ((v < 0) || (v >= 99))
-      {
-         int v_max = v;
-         buf2.reset(new char[v + 3]);
-         v = quadmath_snprintf(&buf2[0], v_max + 3, format.c_str(), digits, m_value);
-         if (v >= v_max + 3)
-         {
-            BOOST_MATH_THROW_EXCEPTION(std::runtime_error("Formatting of float128_type failed."));
-         }
-         s = &buf2[0];
-      }
-      else
-         s = buf;
-      std::streamsize ss = os.width();
-      if (ss > static_cast<std::streamsize>(s.size()))
-      {
-         char fill = os.fill();
-         if ((os.flags() & std::ios_base::left) == std::ios_base::left)
-            s.append(static_cast<std::string::size_type>(ss - s.size()), fill);
-         else
-            s.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(ss - s.size()), fill);
-      }
-
-      return os << s;
-   }
-
-
-} // namespace std
-
-// We will now remove the preprocessor symbols representing quadruple-precision <cmath>
-// functions from the preprocessor.
-
-#undef BOOST_CSTDFLOAT_FLOAT128_LDEXP
-#undef BOOST_CSTDFLOAT_FLOAT128_FREXP
-#undef BOOST_CSTDFLOAT_FLOAT128_FABS
-#undef BOOST_CSTDFLOAT_FLOAT128_FLOOR
-#undef BOOST_CSTDFLOAT_FLOAT128_CEIL
-#undef BOOST_CSTDFLOAT_FLOAT128_SQRT
-#undef BOOST_CSTDFLOAT_FLOAT128_TRUNC
-#undef BOOST_CSTDFLOAT_FLOAT128_EXP
-#undef BOOST_CSTDFLOAT_FLOAT128_EXPM1
-#undef BOOST_CSTDFLOAT_FLOAT128_POW
-#undef BOOST_CSTDFLOAT_FLOAT128_LOG
-#undef BOOST_CSTDFLOAT_FLOAT128_LOG10
-#undef BOOST_CSTDFLOAT_FLOAT128_SIN
-#undef BOOST_CSTDFLOAT_FLOAT128_COS
-#undef BOOST_CSTDFLOAT_FLOAT128_TAN
-#undef BOOST_CSTDFLOAT_FLOAT128_ASIN
-#undef BOOST_CSTDFLOAT_FLOAT128_ACOS
-#undef BOOST_CSTDFLOAT_FLOAT128_ATAN
-#undef BOOST_CSTDFLOAT_FLOAT128_SINH
-#undef BOOST_CSTDFLOAT_FLOAT128_COSH
-#undef BOOST_CSTDFLOAT_FLOAT128_TANH
-#undef BOOST_CSTDFLOAT_FLOAT128_ASINH
-#undef BOOST_CSTDFLOAT_FLOAT128_ACOSH
-#undef BOOST_CSTDFLOAT_FLOAT128_ATANH
-#undef BOOST_CSTDFLOAT_FLOAT128_FMOD
-#undef BOOST_CSTDFLOAT_FLOAT128_ATAN2
-#undef BOOST_CSTDFLOAT_FLOAT128_LGAMMA
-#undef BOOST_CSTDFLOAT_FLOAT128_TGAMMA
-
-//   begin more functions
-#undef BOOST_CSTDFLOAT_FLOAT128_REMAINDER
-#undef BOOST_CSTDFLOAT_FLOAT128_REMQUO
-#undef BOOST_CSTDFLOAT_FLOAT128_FMA
-#undef BOOST_CSTDFLOAT_FLOAT128_FMAX
-#undef BOOST_CSTDFLOAT_FLOAT128_FMIN
-#undef BOOST_CSTDFLOAT_FLOAT128_FDIM
-#undef BOOST_CSTDFLOAT_FLOAT128_NAN
-#undef BOOST_CSTDFLOAT_FLOAT128_EXP2
-#undef BOOST_CSTDFLOAT_FLOAT128_LOG2
-#undef BOOST_CSTDFLOAT_FLOAT128_LOG1P
-#undef BOOST_CSTDFLOAT_FLOAT128_CBRT
-#undef BOOST_CSTDFLOAT_FLOAT128_HYPOT
-#undef BOOST_CSTDFLOAT_FLOAT128_ERF
-#undef BOOST_CSTDFLOAT_FLOAT128_ERFC
-#undef BOOST_CSTDFLOAT_FLOAT128_LLROUND
-#undef BOOST_CSTDFLOAT_FLOAT128_LROUND
-#undef BOOST_CSTDFLOAT_FLOAT128_ROUND
-#undef BOOST_CSTDFLOAT_FLOAT128_NEARBYINT
-#undef BOOST_CSTDFLOAT_FLOAT128_LLRINT
-#undef BOOST_CSTDFLOAT_FLOAT128_LRINT
-#undef BOOST_CSTDFLOAT_FLOAT128_RINT
-#undef BOOST_CSTDFLOAT_FLOAT128_MODF
-#undef BOOST_CSTDFLOAT_FLOAT128_SCALBLN
-#undef BOOST_CSTDFLOAT_FLOAT128_SCALBN
-#undef BOOST_CSTDFLOAT_FLOAT128_ILOGB
-#undef BOOST_CSTDFLOAT_FLOAT128_LOGB
-#undef BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER
-#undef BOOST_CSTDFLOAT_FLOAT128_NEXTTOWARD
-#undef BOOST_CSTDFLOAT_FLOAT128_COPYSIGN
-#undef BOOST_CSTDFLOAT_FLOAT128_SIGNBIT
-#undef BOOST_CSTDFLOAT_FLOAT128_FPCLASSIFY
-#undef BOOST_CSTDFLOAT_FLOAT128_ISFINITE
-#undef BOOST_CSTDFLOAT_FLOAT128_ISINF
-#undef BOOST_CSTDFLOAT_FLOAT128_ISNAN
-#undef BOOST_CSTDFLOAT_FLOAT128_ISNORMAL
-#undef BOOST_CSTDFLOAT_FLOAT128_ISGREATER
-#undef BOOST_CSTDFLOAT_FLOAT128_ISGREATEREQUAL
-#undef BOOST_CSTDFLOAT_FLOAT128_ISLESS
-#undef BOOST_CSTDFLOAT_FLOAT128_ISLESSEQUAL
-#undef BOOST_CSTDFLOAT_FLOAT128_ISLESSGREATER
-#undef BOOST_CSTDFLOAT_FLOAT128_ISUNORDERED
-//   end more functions
-
-#endif // Not BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT (i.e., the user would like to have libquadmath support)
-
-#endif // BOOST_MATH_CSTDFLOAT_CMATH_2014_02_15_HPP_
-

Some files were not shown because too many files changed in this diff